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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: #cbd5e0;
    font-weight: 400;
}

.back-link {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.main-content {
    padding: 40px 30px;
}

.irctc-card {
    background: #f7fafc;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.intro-section {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.intro-section h2 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 10px;
}

.intro-section p {
    font-size: 16px;
    color: #718096;
    line-height: 1.6;
}

.irctc-input-group {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.irctc-input-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
}

.irctc-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.irctc-date-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 16px;
}

.irctc-date-input:focus {
    outline: none;
    border-color: #667eea;
}

.irctc-reset-btn {
    background: #ed8936;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
}

.irctc-reset-btn:hover {
    background: #dd6b20;
    transform: rotate(180deg);
}

.irctc-check-btn {
    width: 100%;
    background: #667eea;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.irctc-check-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.irctc-check-btn.book-mode {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    font-size: 18px;
    font-weight: 700;
    padding: 16px 24px;
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.irctc-check-btn.book-mode:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.5);
}

.irctc-check-btn.book-mode::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.irctc-check-btn.book-mode:hover::before {
    width: 300px;
    height: 300px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(72, 187, 120, 0.6);
    }
}

.irctc-result {
    margin-bottom: 20px;
}

.result-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.result-card.status-open {
    border-color: #48bb78;
    background: #f0fff4;
}

.result-card.status-closed {
    border-color: #e53e3e;
    background: #fff5f5;
}

.result-card.status-past {
    border-color: #a0aec0;
    background: #edf2f7;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-row:last-of-type {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.result-value {
    color: #2d3748;
    font-size: 14px;
}

.result-status {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.6;
}

.booking-opens-info {
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.8;
}

.booking-opens-info strong {
    color: #2d3748;
    font-size: 16px;
}

.booking-opens-info small {
    color: #4a5568;
    font-size: 13px;
}

.status-open .result-status {
    color: #22543d;
}

.status-closed .result-status {
    color: #742a2a;
}

.status-past .result-status {
    color: #4a5568;
}

.book-ticket-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
}

.book-note {
    margin: 0;
    padding: 12px 20px;
    font-size: 14px;
    color: #22543d;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-radius: 8px;
    border: 2px solid #9ae6b4;
    font-weight: 600;
    animation: fadeIn 0.5s ease;
}

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

.irctc-countdown {
    margin-bottom: 20px;
}

.countdown-timer {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid #667eea;
    text-align: center;
    font-size: 15px;
    color: #2d3748;
}

.countdown-value {
    font-weight: bold;
    color: #667eea;
    font-size: 18px;
    display: block;
    margin-top: 5px;
}

.countdown-complete {
    background: #f0fff4;
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid #48bb78;
    text-align: center;
    font-size: 15px;
    color: #22543d;
    font-weight: 600;
}

.irctc-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.irctc-info h3 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 15px;
}

.irctc-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.irctc-info li {
    padding: 8px 0;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
}

.irctc-info li:before {
    content: "✓ ";
    color: #48bb78;
    font-weight: bold;
    margin-right: 8px;
}

.irctc-info strong {
    color: #667eea;
}

.faq-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.faq-section h3 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

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

.faq-item h4 {
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

.footer {
    background: #2d3748;
    color: #cbd5e0;
    padding: 20px 30px;
    text-align: center;
    font-size: 14px;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* SEO Content Sections */
.seo-intro {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.seo-intro h2 {
    font-size: 22px;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.4;
}

.seo-intro p {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.8;
}

.seo-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.seo-content h2 {
    font-size: 20px;
    color: #2d3748;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.content-block {
    margin-bottom: 25px;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-block h3 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 12px;
}

.content-block p {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 12px;
}

.content-block ul,
.content-block ol {
    margin-left: 25px;
    color: #4a5568;
    line-height: 1.8;
}

.content-block li {
    margin-bottom: 8px;
    font-size: 15px;
}

.content-block strong {
    color: #667eea;
    font-weight: 600;
}

@media (max-width: 640px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    .back-link {
        width: 100%;
        text-align: center;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .irctc-card {
        padding: 20px;
    }
    
    .seo-intro {
        padding: 20px;
    }
    
    .seo-intro h2 {
        font-size: 18px;
    }
    
    .seo-intro p {
        font-size: 14px;
    }
    
    .seo-content {
        padding: 20px;
    }
    
    .seo-content h2 {
        font-size: 18px;
    }
    
    .content-block h3 {
        font-size: 16px;
    }
    
    .content-block p,
    .content-block li {
        font-size: 14px;
    }
    
    .faq-section {
        padding: 20px;
    }
    
    .faq-section h2 {
        font-size: 18px;
    }
    
    .faq-item h3 {
        font-size: 15px;
    }
    
    .faq-item p {
        font-size: 14px;
    }
    
    .result-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .irctc-check-btn.book-mode {
        font-size: 16px;
        padding: 14px 20px;
    }
    
    .irctc-input-row {
        flex-direction: row;
    }
    
    .irctc-reset-btn {
        min-width: 45px;
        padding: 10px 14px;
    }
}

/* Tablet Responsive */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .header {
        padding: 25px;
    }
    
    .header-content h1 {
        font-size: 24px;
    }
    
    .main-content {
        padding: 30px 25px;
    }
    
    .irctc-card {
        padding: 25px;
    }
    
    .seo-intro h2 {
        font-size: 20px;
    }
    
    .seo-content h2 {
        font-size: 19px;
    }
    
    .content-block h3 {
        font-size: 17px;
    }
}

/* Large Desktop */
@media (min-width: 1025px) {
    .container {
        max-width: 1000px;
    }
}

/* Dropdown Styles */
.dropdown-section {
    background: white;
    padding: 0;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dropdown-section:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
    user-select: none;
}

.dropdown-header:hover {
    background: #f7fafc;
}

.dropdown-header h2,
.dropdown-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2d3748;
    flex: 1;
}

.dropdown-header h2 {
    font-size: 20px;
}

.dropdown-icon {
    font-size: 16px;
    color: #667eea;
    transition: transform 0.3s ease;
    margin-left: 15px;
}

.dropdown-section.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 25px;
}

.dropdown-section.active .dropdown-content {
    max-height: 3000px;
    padding: 0 25px 25px 25px;
}

/* Adjust existing styles for dropdown sections */
.dropdown-section.seo-content .dropdown-content,
.dropdown-section.faq-section .dropdown-content,
.dropdown-section.irctc-info .dropdown-content {
    background: white;
}

.dropdown-section.irctc-info .dropdown-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-section.irctc-info .dropdown-content li {
    padding: 8px 0;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
}

.dropdown-section.irctc-info .dropdown-content li:before {
    content: "✓ ";
    color: #48bb78;
    font-weight: bold;
    margin-right: 8px;
}

.dropdown-section.faq-section .faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-section.faq-section .faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.dropdown-section.faq-section .faq-item h3 {
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 8px;
}

.dropdown-section.faq-section .faq-item p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

/* Mobile Responsive for Dropdowns */
@media (max-width: 640px) {
    .dropdown-header {
        padding: 15px 20px;
    }
    
    .dropdown-header h2,
    .dropdown-header h3 {
        font-size: 16px;
    }
    
    .dropdown-header h2 {
        font-size: 17px;
    }
    
    .dropdown-icon {
        font-size: 14px;
        margin-left: 10px;
    }
    
    .dropdown-content {
        padding: 0 20px;
    }
    
    .dropdown-section.active .dropdown-content {
        padding: 0 20px 20px 20px;
    }
}

/* Print Styles */
@media print {
    .header,
    .back-link,
    .irctc-input-group,
    .irctc-countdown,
    .footer {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
    }
    
    .dropdown-section .dropdown-content {
        max-height: none !important;
        padding: 20px !important;
    }
    
    .dropdown-icon {
        display: none;
    }
}
