/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateX(5deg);
}

.title {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Section Styles */
section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

/* Input Section */
.fixed-numbers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

/* Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-generate {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.6);
}

.btn-clear {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-clear:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
}

.btn-check {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-check:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.6);
}

.btn-download {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.6);
}

/* Results Section */
.results-info {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
}

.results-info p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.results-info span {
    font-weight: bold;
    font-size: 1.3rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.result-item {
    background: linear-gradient(45deg, #ffffff, #f1f2f6);
    padding: 15px 10px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #ddd;
    font-weight: bold;
    font-size: 1.1rem;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Checker Section */
.checker-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.check-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #27ae60;
    margin-top: 20px;
}

.check-results h3 {
    color: #27ae60;
    margin-bottom: 15px;
}

.match-found {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
}

.no-match {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* Scrollbar Styling */
.results-grid::-webkit-scrollbar {
    width: 8px;
}

.results-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.results-grid::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.results-grid::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .fixed-numbers {
        grid-template-columns: 1fr;
    }
    
    .checker-inputs {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 200px;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}