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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F5F5F5; /* Changed */
    color: #424242; /* Changed */
    min-height: 100vh;
}

.app-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.page-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6E6E6E; /* Changed */
    font-size: 18px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.back-btn:hover {
    background: #f8f9fa;
}

.page-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #424242; /* Changed */
}

.header-spacer {
    width: 40px;
}

.home-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6E6E6E; /* Changed */
    font-size: 18px;
    border-radius: 8px;
    transition: background 0.2s ease;
    text-decoration: none;
}

.home-btn:hover {
    background: #f8f9fa;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
}

/* Search Section */
.search-section {
    margin-bottom: 24px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px;
    border: 1px solid #BDBDBD; /* Changed */
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #0052A4; /* Changed */
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #BDBDBD; /* Changed */
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.2s ease;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.search-btn {
    width: 100%;
    background: #007bff;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.search-btn:hover {
    background: #0056b3;
}

.search-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Station Info */
.station-info {
    animation: fadeInUp 0.5s ease-out;
}

.station-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.station-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #424242; /* Changed */
}

.station-lines {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.line-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.line-2 {
    background: #00a651;
}

.line-bundang {
    background: #f5a200;
}

.line-1 {
    background: #003499;
}

.line-3 {
    background: #ff6600;
}

.line-4 {
    background: #00a2d1;
}

.line-5 {
    background: #996cac;
}

.line-6 {
    background: #cd7c2f;
}

.line-7 {
    background: #747f00;
}

.line-8 {
    background: #e6186c;
}

.line-9 {
    background: #b7c452;
}

/* Info Tabs */
.info-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 8px;
    cursor: pointer;
    font-weight: 500;
    color: #6E6E6E; /* Changed */
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.tab-btn.active {
    background: #0052A4; /* Changed */
    color: white;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-btn.active:hover {
    background: #003B7A; /* Darker shade */
}

.tab-btn i {
    font-size: 16px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #424242; /* Changed */
}

/* Line Info */
.line-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.line-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.line-detail {
    font-size: 14px;
    color: #6E6E6E; /* Changed */
}

/* Facility List */
.facility-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.facility-item i {
    color: #2E9AFE; /* Changed */
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.facility-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.facility-name {
    font-size: 14px;
    font-weight: 500;
    color: #424242; /* Changed */
}

.facility-location {
    font-size: 12px;
    color: #6E6E6E; /* Changed */
}

/* Realtime Info */
.realtime-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.train-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.train-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.train-direction {
    font-size: 14px;
    font-weight: 500;
    color: #424242; /* Changed */
}

.train-time {
    font-size: 12px;
    color: #6E6E6E; /* Changed */
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 0.5s ease-out;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #6E6E6E; /* Changed */
    font-size: 32px;
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #424242; /* Changed */
}

.no-results p {
    font-size: 14px;
    color: #6E6E6E; /* Changed */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    
    .station-header {
        padding: 20px;
    }
    
    .station-header h2 {
        font-size: 20px;
    }
    
    .info-card {
        padding: 16px;
    }
    
    .tab-btn {
        padding: 10px 6px;
        font-size: 11px;
    }
    
    .tab-btn i {
        font-size: 14px;
    }
    
    .line-item,
    .facility-item,
    .train-info {
        padding: 10px;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Focus States for Accessibility */
.search-input:focus,
.tab-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.back-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}
