/* css/style.css - Complete file with download button styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --hover-bg: #f8fafc;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.logo:hover {
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
}

.main-nav a i {
    font-size: 1.1rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    background: var(--hover-bg);
}

.main-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 0 40px;
    color: white;
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section h1 i {
    margin-right: 15px;
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Tool Section */
.tool-section {
    margin-bottom: 60px;
}

.tool-container {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

/* Builder Tabs */
.builder-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 1.2rem;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--hover-bg);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background: linear-gradient(to top, rgba(37,99,235,0.1), transparent);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content.active {
    display: block;
}

/* Builder Grid */
.builder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.cron-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cron-field label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.cron-select {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cron-select:hover {
    border-color: var(--primary-color);
}

.cron-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Manual Input */
.manual-input {
    margin-bottom: 25px;
}

.manual-input label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.cron-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.cron-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.input-hint {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Presets Grid */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.preset-btn {
    padding: 12px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.preset-btn:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Expression Display */
.expression-display {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.expression-display label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.expression-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.expression-box code {
    flex: 1;
    font-size: 1.8rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.copy-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Tester Section */
.tester-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.tester-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.test-controls label {
    font-weight: 600;
    color: var(--text-primary);
}

.test-controls input {
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--text-secondary), #4a5568);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #4a5568, #2d3748);
}

.btn-secondary i {
    font-size: 1rem;
}

/* Results Container */
.results-container {
    background: var(--hover-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
}

.matches-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.match-count {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.matches-list {
    list-style: none;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.matches-list li {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 10px;
}

.matches-list li:last-child {
    border-bottom: none;
}

.matches-list li::before {
    content: "⏰";
    color: var(--primary-color);
    font-size: 1.2rem;
}

.matches-list .placeholder {
    color: var(--text-secondary);
    font-style: italic;
    justify-content: center;
}

.matches-list .placeholder::before {
    display: none;
}

/* Explanation Section */
.explanation-section {
    background: var(--hover-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.explanation-section h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.explanation-content ul {
    list-style: none;
    margin-bottom: 15px;
}

.explanation-content li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    gap: 15px;
}

.field {
    font-weight: 600;
    min-width: 120px;
    color: var(--primary-color);
}

.field-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.summary {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(59,130,246,0.1));
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* How to Use Section */
.how-to-section {
    margin: 60px 0;
    padding: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: white;
}

.how-to-section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step-card {
    background: rgba(255,255,255,0.15);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.2);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    box-shadow: var(--shadow-md);
}

.step-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.step-card p {
    opacity: 0.9;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin: 60px 0;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.faq-item {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 20px;
    background: var(--hover-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(90deg);
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    background: white;
}

.faq-answer.active {
    max-height: 300px;
    padding: 20px;
    border-top: 2px solid var(--border-color);
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Info Boxes */
.info-box {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.info-box h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box p {
    opacity: 0.95;
    line-height: 1.8;
}

/* Footer */
.site-footer {
    background: var(--dark-bg);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* Validation States */
.cron-input.valid {
    border-color: var(--success-color) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

.cron-input.error {
    border-color: var(--danger-color) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .builder-grid {
        grid-template-columns: 1fr;
    }
    
    .presets-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .test-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}