:root {
    --bg-color: #171718;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --icon-color: #b0b0b0;
    --icon-active: #ffffff;
    --icon-red: #ff3b30;
    --divider-color: #2c2c2e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

.app-container {
    max-width: 450px; /* Default to desktop/tablet friendly width */
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.close-icon {
    font-size: 24px;
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-name {
    font-size: 24px;
    /* font-weight: 600; */
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-name i {
    font-size: 16px;
    color: inherit; /* Inherit white from parent */
    margin-left: 4px;
}

.page-indicator {
    background-color: #3a3a3c;
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.battery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.battery-container {
    width: 24px;
    height: 12px;
    border: 1px solid var(--text-secondary);
    border-radius: 3px;
    padding: 1px;
    position: relative;
}

.battery-container::after {
    content: '';
    width: 2px;
    height: 5px;
    background-color: var(--text-secondary);
    border-radius: 0 1px 1px 0;
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
}

.battery-level {
    height: 100%;
    background-color: var(--text-secondary);
    border-radius: 1px;
}

.battery-icon {
    transform: rotate(0deg); 
}

.white-color{
    
}

.status-text {
    color: var(--text-secondary);
    font-size: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-primary);
}

/* Hero */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.car-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    /* Add a slight drop shadow if image doesn't have it */
    /* filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); */
    opacity: 0.85; /* Add transparency */
}

/* Quick Controls */
.quick-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 10px;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn.active {
    color: var(--icon-active);
    /* In the image, the fan is white, suggesting active state but no background change visible */
}

.control-btn.active-red {
    color: var(--icon-red);
}

.control-btn:active {
    background-color: #2c2c2e;
}

.control-icon-img {
    width: 37px;
    object-fit: contain;
}

.menu-icon {
    width: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: var(--text-secondary);
}

.menu-icon-img {
    width: 100%;
    height: auto;
    max-height: 33px;
    object-fit: contain;
    opacity: 0.6; /* Match text-secondary somewhat */
}

/* Specific adjustment for red active icon if needed */
.active-red .control-icon-img {
    /* If the image itself is red, no filter needed. If it's white/black and needs to be red: */
    /* filter: sepia(1) saturate(5) hue-rotate(-50deg); */
}

/* Menu List */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
}

.menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.white-color{
    color: var(--text-primary) !important;
}
.menu-title {
    font-size: 21px;
    font-weight: 500;
}

.menu-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.arrow-icon {
    color: #3a3a3c;
    font-size: 14px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.status-dot.red {
    background-color: var(--icon-red);
}

/* Media query for smaller screens/older phones */
@media (max-width: 480px) {
    body {
        overflow: hidden; /* Prevent scrolling on mobile full screen */
    }

    .app-container {
        max-width: 100%;
        justify-content: space-between;
    }

    .header {
        padding-top: env(safe-area-inset-top, 20px);
        margin-bottom: 10px;
        flex-shrink: 0;
    }

    .hero {
        margin: 10px 0;
        min-height: 0;
    }

    .car-image {
        max-height: 25vh;
    }

    .quick-controls {
        justify-content: space-around;
        margin-bottom: 20px;
        padding: 0;
        flex-shrink: 0;
    }

    .control-btn {
        width: 13vw;
        height: 13vw;
        max-width: 56px;
        max-height: 56px;
    }

    .menu-list {
        gap: 16px;
        padding-bottom: env(safe-area-inset-bottom, 20px);
        overflow-y: auto;
        flex-shrink: 1;
        min-height: 0;
    }

    .menu-item {
        gap: 16px;
        padding: 8px 0;
    }
}

/* Specific small height adjustments */
@media (max-height: 700px) and (max-width: 480px) {
    .car-image {
        max-height: 8vh;
    }
    
    .quick-controls {
        margin-bottom: 10px;
    }
    
    .menu-list {
        gap: 12px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: var(--bg-color);
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--divider-color);
}

.save-btn {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: #e0e0e0;
}

.save-btn:active {
    background-color: #c7c7c7;
}

/* Image Modal Styles */
.image-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-option {
    padding: 12px;
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    color: var(--text-primary);
}

.image-option:hover {
    background-color: #3a3a3c;
}

.image-option:active {
    background-color: #4a4a4c;
}
