:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --accent-color: #ff0055;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

.light-mode {
    --bg-dark: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --gradient-bg: linear-gradient(135deg, #f0f2f5 0%, #e2e8f0 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
}

/* Layout */
.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
    gap: 1rem;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.logo h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 1.5rem;
}

.header-controls {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    min-height: 0;
}

/* Map Section */
.map-section {
    flex: 2;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    position: relative;
}

.map-container {
    height: 100%;
    width: 100%;
    position: relative;
}

#map {
    cursor: crosshair;
    height: 100%;
    width: 100%;
    z-index: 1;
}

.map-overlay-info {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    z-index: 1000;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    pointer-events: none;
}

.map-travel-time {
    background: var(--bg-card);
    backdrop-filter: blur(4px);
    color: var(--text-main);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--primary-color);
    font-size: 0.95rem;
    font-family: var(--font-body);
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-travel-time::before {
    display: none !important;
}

/* Itinerary Section */
.itinerary-section {
    flex: 1;
    min-width: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.itinerary-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.itinerary-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.itinerary-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.itinerary-list::-webkit-scrollbar {
    width: 6px;
}

.itinerary-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Cards */
.location-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    height: 100px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.location-card.expanded {
    height: auto;
    cursor: grab;
}

.location-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.location-card.expanded:hover {
    transform: translateY(-3px);
}

.location-card.sortable-ghost {
    opacity: 0.4;
}

.location-card.sortable-drag {
    cursor: grabbing;
    background: rgba(58, 123, 213, 0.2);
    border: 1px solid var(--primary-color);
}

.location-card.disabled {
    opacity: 0.6;
    filter: grayscale(100%);
    background: rgba(255, 255, 255, 0.02);
}

.location-card.disabled:hover {
    opacity: 0.8;
}

.card-action-btn.disable {
    background: rgba(0, 0, 0, 0.6);
}

.card-action-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

@media print {
    .location-card.disabled {
        display: none !important;
    }
}

.card-image {
    height: 100px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(15, 23, 42, 0.9) 100%);
}

.card-header-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 60px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.card-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.card-header-overlay .card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-main);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-weather {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.location-card:hover .card-actions {
    opacity: 1;
}

.card-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: visible;
}

.card-content::-webkit-scrollbar {
    width: 4px;
}

.card-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.card-content::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 0.8rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-bottom: 0.8rem;
}

.detail-row {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 0.8rem;
}

.detail-row i {
    color: var(--primary-color);
    margin-top: 3px;
    width: 16px;
}

.fun-fact {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    font-style: italic;
    border-left: 3px solid #475569;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #1e293b;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 0.8rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
    transition: all 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem;
    border-radius: 8px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.tab.active {
    background: var(--primary-color);
    color: var(--bg-dark);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.5;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Modal Content */
.info-content {
    line-height: 1.8;
}

.info-content p {
    margin-bottom: 1rem;
    font-weight: normal;
}

.info-content strong {
    font-weight: 600;
    color: var(--primary-color);
}

.info-content a {
    color: #60d5ff;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: normal;
}

.info-content a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {

    /* Keep app wrapper fixed height to enable internal scrolling */
    .app-wrapper {
        height: 100vh;
        overflow: hidden;
    }

    .main-content {
        flex-direction: column;
        min-height: 0;
        /* Crucial for nested flex scrolling */
    }

    .map-section {
        height: 40vh;
        /* Use vh instead of fixed px for better scaling */
        min-height: 300px;
        flex: none;
    }

    .itinerary-section {
        min-width: 0;
        flex: 1;
        /* Take remaining space */
        min-height: 0;
        /* Crucial for nested flex scrolling */
        display: flex;
        flex-direction: column;
    }

    .itinerary-list {
        flex: 1;
        overflow-y: auto;
    }

    /* Fix card expansion on mobile */
    .location-card.expanded {
        height: auto !important;
        max-height: none !important;
    }

    .card-content {
        max-height: none !important;
        overflow: visible !important;
    }

    /* Make action buttons always visible on mobile */
    .card-actions {
        opacity: 1 !important;
    }
}

/* Travel Mode Selector */
.travel-mode-selector {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.travel-mode-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
}

.travel-mode-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.4);
}

.travel-mode-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.6), 0 0 0 3px rgba(0, 210, 255, 0.2);
    transform: scale(1.1);
}

.travel-mode-btn.active i {
    transform: scale(1.2);
    animation: pulse 0.5s ease;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1.3);
    }
}

/* Mobile Improvements (Portrait) */
@media (max-width: 600px) {
    body {
        height: auto;
        overflow: auto;
    }

    .app-wrapper {
        height: auto;
        min-height: 100vh;
    }

    .main-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .header-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .main-content {
        flex-direction: column;
    }

    .map-section {
        height: 40vh;
        min-height: 300px;
        flex: none;
    }

    .itinerary-section {
        min-width: 0;
        height: auto;
        flex: none;
    }

    .itinerary-list {
        overflow-y: visible;
    }

    .location-card.expanded {
        height: auto !important;
        max-height: none !important;
    }

    .card-content {
        max-height: none !important;
        overflow: visible !important;
    }

    .card-actions {
        opacity: 1 !important;
    }
}

/* Mobile Landscape Mode - Aggressive Override */
@media (max-width: 900px) and (orientation: landscape) {

    html,
    body {
        height: auto !important;
        min-height: 100% !important;
        overflow-y: auto !important;
    }

    .app-wrapper {
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    .main-content {
        flex-direction: column !important;
        height: auto !important;
    }

    .map-section {
        height: 60vh !important;
        min-height: 250px !important;
        flex: none !important;
    }

    .itinerary-section {
        height: auto !important;
        overflow: visible !important;
        flex: none !important;
    }

    .itinerary-list {
        overflow-y: visible !important;
        flex: none !important;
    }
}


/* Mobile Button Fixes */
@media (max-width: 900px) {
    .card-action-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .card-header-overlay {
        right: 140px;
    }

    .card-actions {
        opacity: 1 !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        height: auto;
        overflow: visible;
    }

    .app-wrapper {
        display: block;
        height: auto;
        padding: 0;
        max-width: none;
    }

    .main-header,
    .map-section,
    .travel-mode-selector,
    .card-actions,
    .modal,
    .add-location-btn {
        display: none !important;
    }

    .itinerary-section {
        border: none;
        background: none;
        box-shadow: none;
        width: 100%;
        overflow: visible !important;
        height: auto !important;
        display: block !important;
    }

    .itinerary-header {
        border-bottom: 2px solid #000;
        padding: 1rem 0;
        margin-bottom: 2rem;
    }

    .itinerary-header h2 {
        color: black;
        font-size: 24pt;
    }

    .badge {
        display: none;
    }

    .itinerary-list {
        overflow: visible;
        display: block;
        padding: 0;
    }

    .location-card {
        break-inside: avoid;
        background: none;
        border: none;
        border-bottom: 1px solid #ccc;
        border-radius: 0;
        margin-bottom: 2rem;
        height: auto !important;
        min-height: 0;
        box-shadow: none;
        padding-bottom: 1rem;
        display: block;
    }

    .location-card.expanded {
        height: auto !important;
        max-height: none !important;
    }

    /* Reset Image Container to show header */
    .card-image {
        height: auto;
        background: none !important;
        margin-bottom: 0.5rem;
    }

    .card-image::after {
        display: none;
    }

    .card-header-overlay {
        position: static;
        color: black;
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 0.2rem;
    }

    .card-header-overlay .card-title {
        color: black;
        text-shadow: none;
        font-size: 18pt;
        font-weight: bold;
        white-space: normal;
        overflow: visible;
    }

    .card-number {
        background: #000 !important;
        color: white !important;
        width: 30px;
        height: 30px;
        font-size: 12pt;
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .fun-fact {
        background: #f5f5f5;
        color: #333;
        border-left: 3px solid #000;
        margin-top: 1rem;
        padding: 0.8rem;
        font-style: italic;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .fun-fact i {
        display: none;
    }
}

.phrases-section {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(58, 123, 213, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    border-left: 3px solid var(--secondary-color);
}

.phrases-section strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.3rem;
}

@media print {
    .phrases-section {
        background: #f0f8ff;
        color: #333;
        border-left: 3px solid #3a7bd5;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .phrases-section strong {
        color: #000;
    }
}

/* Main Modal Tabs */

.main-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: transparent;
    padding: 0;
    border-bottom: none;
}

.main-tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    border-radius: 12px 12px 0 0;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-bottom: none;
    position: relative;
    top: 2px;
}

.main-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.main-tab.active {
    background: var(--bg-card);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid var(--bg-card);
    box-shadow: none;
}

.main-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    min-height: 450px;
    /* Prevent jumping */
}

.main-tab-content.active {
    display: block;
}

/* Map Markers */
.custom-div-icon {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--primary-color);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.marker-pin i {
    transform: rotate(45deg);
    color: white;
    font-size: 14px;
}

/* Stay Marker (light blue) */
.marker-pin.stay-marker {
    background: #5984b6;
}

.marker-pin.stay-marker i {
    font-size: 12px;
}

@media print {
    .meta-item i {
        display: inline-block !important;
        color: #666 !important;
        margin-right: 0.3rem;
    }
}

@media print {
    .card-weather {
        display: block !important;
        color: #000 !important;
        text-shadow: none !important;
    }

    .card-weather i {
        color: #000 !important;
    }
}

/* Settings Modal Styling */
/* Settings Modal Styling */
.settings-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.settings-group h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.6rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    font-size: 1rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 1rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--secondary-color);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.action-grid .btn {
    justify-content: center;
    padding: 0.8rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Instruction Box */
.instruction-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem;
    border-radius: 8px;
    margin-top: 0.8rem;
    border: 1px dashed var(--border-color);
}

.instruction-box h4 {
    margin-bottom: 0.4rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.instruction-box code {
    display: block;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.6rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #a5b4fc;
    overflow-x: auto;
    margin: 0.4rem 0;
    border: 1px solid var(--border-color);
}

.instruction-box .note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.4rem;
}

.info-content p {
    margin-bottom: 0.2rem;
}