:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --accent: #4ade80;
    --bg-dark: #0f172a;
    --bg-light: #f3f4f6;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    overflow-x: hidden;
    position: relative;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.15;
    border-radius: 50%;
    animation: move 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(30px, 30px) scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.back-btn {
    color: var(--text-main);
    text-decoration: none;
    background: var(--glass-bg);
    padding: 12px 24px;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
    border-color: var(--primary);
}

.brand-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
}

.subway-hero {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 60px 40px;
    margin-bottom: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.location-info {
    text-align: center;
    margin-bottom: 40px;
}

.location-info h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.location-info h1 i {
    color: var(--primary);
}

.location-info p {
    font-size: 1.1rem;
    color: var(--text-dim);
}

.station-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.station-selector label {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

.direction-selector {
    margin-bottom: 40px;
}

.direction-selector label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-main);
}

.direction-select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f8fafc' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 50px;
}

.direction-select:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.direction-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1);
}

.line-select,
.station-select {
    flex: 1;
    min-width: 200px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f8fafc' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 50px;
}

.line-select:hover,
.station-select:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.line-select:focus,
.station-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.1);
}

.line-selector,
.station-selector {
    flex: 1;
    min-width: 200px;
}

.selector-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.station-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-main);
}

.arrival-list {
    display: grid;
    gap: 20px;
}

.arrival-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.arrival-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.arrival-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.line-badge {
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(0, 210, 255, 0.2);
    border: 1px solid rgba(0, 210, 255, 0.4);
    color: var(--primary);
}

.direction-badge {
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: var(--accent);
}

.arrival-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.destination,
.arrival-time {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.destination i,
.arrival-time i {
    color: var(--primary);
    width: 20px;
}

.next-station {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.next-station i {
    font-size: 0.85rem;
}

.train-type {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--accent);
    display: inline-block;
}

.arrival-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.arrival-status.status-entering {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.arrival-status.status-arrived {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.arrival-status.status-departed {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.remaining-stations {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #a78bfa;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remaining-stations i {
    font-size: 0.85rem;
}

.train-no {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 8px;
}

.train-no i {
    font-size: 0.85rem;
}

.recptn-dt {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.recptn-dt i {
    font-size: 0.75rem;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data p {
    font-size: 1.1rem;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    flex-direction: column;
    gap: 20px;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

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

#error-msg {
    display: none;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 16px 24px;
    border-radius: 18px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin-bottom: 20px;
    font-weight: 500;
}

/* 상세 페이지용 스타일 */
.arrival-detail-content {
    margin-top: 40px;
}

.arrival-detail-content .arrival-card {
    cursor: default;
}

/* 토스트 알림 메시지 */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 24px;
    color: var(--text-main);
    font-size: 0.95rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .location-info h1 {
        font-size: 2rem;
    }

    .subway-hero {
        padding: 40px 20px;
    }

    .arrival-card {
        padding: 20px;
    }
}

footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-dim);
}

/* 라이트 테마 스타일 */
body.theme-light {
    background-color: var(--bg-light);
    color: #111827;
    --text-main: #0f172a;
    --text-dim: #6b7280;
}

/* 라이트 테마 드롭박스 스타일 */
body.theme-light .line-select,
body.theme-light .station-select,
body.theme-light .direction-select {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #0f172a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f172a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

body.theme-light .line-select:hover,
body.theme-light .station-select:hover,
body.theme-light .direction-select:hover {
    background-color: #f9fafb;
    border-color: var(--primary);
}

body.theme-light .line-select:focus,
body.theme-light .station-select:focus,
body.theme-light .direction-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}
