/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00c9ff, #92fe9d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Components grid */
.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.component-group {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.component-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.component-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.component-group select:focus {
    outline: none;
    border-color: #00c9ff;
    box-shadow: 0 0 0 3px rgba(0, 201, 255, 0.3);
}

.component-group select option {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

/* Loading indicators */
.loading-indicator {
    display: none;
    margin-top: 10px;
    padding: 8px;
    font-size: 0.9rem;
    color: #00c9ff;
    text-align: center;
}

/* Actions */
.actions {
    text-align: center;
    margin-bottom: 30px;
}

.actions button {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #00c9ff, #92fe9d);
    color: #1a2a6c;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.actions button:active {
    transform: translateY(0);
}

.actions button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results */
#results, #compatibleComponents {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
}

#results h2, #compatibleComponents h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: #92fe9d;
}

#results-content, #compatibleComponents-content {
    min-height: 100px;
}

#results-content p, #compatibleComponents-content p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    color: #00c9ff;
}

/* Success state */
.success {
    background: rgba(46, 204, 113, 0.2);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2ecc71;
}

.success h3 {
    color: #2ecc71;
    margin-bottom: 10px;
}

/* Error state */
.error {
    background: rgba(231, 76, 60, 0.2);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.error h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.error ul {
    margin-top: 10px;
    padding-left: 20px;
}

.error li {
    margin-bottom: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .components-grid {
        grid-template-columns: 1fr;
    }
    
    .component-group {
        padding: 15px;
    }
}

.component-list {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.component-list h4 {
    margin-bottom: 10px;
    color: #00c9ff;
}

.component-list ul {
    list-style-type: none;
    padding-left: 0;
}

.component-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.component-list li:last-child {
    border-bottom: none;
}

.compatibility-result {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.compatible {
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid #2ecc71;
}

.incompatible {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
}

.compatibility-result h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.issues-list {
    text-align: left;
    margin-top: 15px;
}

.issues-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.issues-list li:before {
    content: "•";
    color: #e74c3c;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.component-list ul {
    list-style-type: none;
    padding-left: 0;
}

.component-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.component-list li:last-child {
    border-bottom: none;
}

.loading {
    text-align: center;
    padding: 20px;
}

.loading:after {
    content: ".";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60% { content: "..."; }
    80%, 100% { content: ""; }
}
