/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}

/* Main Container */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1d6fb7 0%, #1a73e8 100%);
}

/* Header Styles */
.header {
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
    background: #fff;
    /* background: linear-gradient(135deg, #1a73e8, #1d6fb7); */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Form Styles */
form {
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

/* Select Wrapper and Dropdown Styles */
.select-wrapper {
    position: relative;
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    transition: color 0.3s ease;
}

.select-wrapper:hover::after {
    color: #667eea;
}

/* Button Styles */
.check-btn {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: #fff;
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 20px 0;
    width: 100%;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.check-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.check-btn:hover::before {
    left: 100%;
}

.check-btn:active {
    transform: translateY(0);
}

.check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Loading States */
.loading {
    margin-top: 30px;
    padding: 25px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    text-align: center;
    display: none;
    position: relative;
}

.loading.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-text {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 0%;
    border-radius: 4px;
    animation: progress 5s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: move 2s linear infinite;
}

.progress-percentage {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
}

/* Result Styles */
.result {
    margin-top: 30px;
    padding: 25px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    display: none;
    position: relative;
    overflow: hidden;
}

.result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.result.compatible {
    /*background: linear-gradient(135deg, #4CAF50, #45a049);*/
    background: #0e99d7;
    color: white;
    border: 3px solid #0e99d7;
}

.result.compatible::before {
    background: linear-gradient(135deg, #105e80, #105e80);
}

.result.incompatible {
    /*background: linear-gradient(135deg, #009412, #27da0b);*/
    background: #105e80;
    color: white;
    border: 3px solid #105e80;
}

.result.incompatible::before {
    background: linear-gradient(135deg, #105e80, #105e80);
}

.result.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Compatibility Message */
.compatibility-message {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

/* Download Container */
.download-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Download Buttons */
.download-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: block;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.download-btn:active {
    transform: translateY(0);
}

/* Device Info Styles */
.device-info {
    background: rgba(248, 249, 250, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
    backdrop-filter: blur(10px);
}

.device-info h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    text-align: center;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
    align-items: center;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
    color: #666;
}

.info-value {
    font-weight: 600;
    color: #333;
    text-align: right;
    flex: 1;
    margin-left: 10px;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    select {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .check-btn {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .result {
        font-size: 16px;
        padding: 20px;
    }
    
    .compatibility-message {
        font-size: 16px;
    }
    
    .download-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .device-info {
        padding: 15px;
    }
    
    .device-info h3 {
        font-size: 18px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .info-value {
        text-align: left;
        margin-left: 0;
        margin-top: 5px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .download-container {
        gap: 10px;
    }
    
    .download-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .header h1 {
        color: #ffffff;
    }
    
    .header p {
        color: #cccccc;
    }
    
    .form-group label {
        color: #ffffff;
    }
    
    select {
        background: #2a2a2a;
        color: #ffffff;
        border-color: #444444;
    }
    
    select:focus {
        border-color: #667eea;
    }
    
    .device-info {
        background: rgba(42, 42, 42, 0.9);
    }
    
    .device-info h3 {
        color: #ffffff;
    }
    
    .info-label {
        color: #cccccc;
    }
    
    .info-value {
        color: #ffffff;
    }
    
    .download-btn {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .download-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none;
        border: 4px solid #667eea;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .check-btn, .download-btn {
        display: none;
    }
    
    .loading {
        display: none !important;
    }
}