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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    transition: transform 2s ease-in-out;
    position: relative;
}

.wake-lock-status {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 0, 0.3);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.wake-lock-status.inactive {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    border-color: rgba(255, 0, 0, 0.3);
}

/* Clock Section (Left 60%) */
.clock-section {
    flex: 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: transparent;
}

.clock-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Digital Clock */
.digital-clock {
    text-align: center;
    font-size: 4rem;
    font-weight: 300;
}

.time {
    font-size: 18vw;
    font-weight: 200;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    line-height: 0.9;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.seconds {
    font-size: 6vw;
    font-weight: 300;
    margin-left: 0.5rem;
    margin-bottom: 0.5vw;
    opacity: 0.8;
}

.date {
    font-size: 6.5vw;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 500;
}

.weekday {
    font-size: 3vw;
    opacity: 0.8;
}

/* Analog Clock */
.analog-clock {
    position: relative;
    width: min(80vh, 80vw);
    height: min(80vh, 80vw);
    margin: 0 auto;
}

.clock-face {
    width: 100%;
    height: 100%;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom;
    background: white;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

.hour-hand {
    width: 16px;
    height: 30%;
    background: linear-gradient(to top, #fff, #ccc);
}

.minute-hand {
    width: 12px;
    height: 40%;
    background: linear-gradient(to top, #fff, #ddd);
}

.second-hand {
    width: 6px;
    height: 45%;
    background: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.number {
    position: absolute;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.number-12 {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}
.number-1 {
    top: 10%;
    right: 20%;
}
.number-2 {
    top: 25%;
    right: 8%;
}
.number-3 {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}
.number-4 {
    bottom: 25%;
    right: 8%;
}
.number-5 {
    bottom: 10%;
    right: 20%;
}
.number-6 {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}
.number-7 {
    bottom: 10%;
    left: 20%;
}
.number-8 {
    bottom: 25%;
    left: 8%;
}
.number-9 {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}
.number-10 {
    top: 25%;
    left: 8%;
}
.number-11 {
    top: 10%;
    left: 20%;
}

.hidden {
    display: none;
}

/* Clock Settings */
.clock-settings {
    display: none;
    gap: 1rem;
    margin-bottom: 2rem;
}

.setting-btn {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.setting-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Weather Section (Right 40%) */
.weather-section {
    flex: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: transparent;
}

.weather-container {
    width: 100%;
    max-width: 500px;
    text-align: center;
    min-height: 200px;
}

.location-input {
    display: none;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

#zipcode {
    padding: 1.5rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    width: 250px;
}

#zipcode::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.update-btn {
    padding: 1.5rem 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.update-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.weather-display {
    background: transparent;
    border-radius: 20px;
    padding: 2rem;
}

.weather-main {
    margin-bottom: 2rem;
}

.temperature {
    font-size: 10vw;
    font-weight: 200;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    line-height: 0.9;
}

.weather-description {
    font-size: 3.5vw;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.location {
    font-size: 2.5vw;
    opacity: 0.8;
}

.last-updated {
    font-size: 1.5vw;
    opacity: 0.6;
    margin-top: 0.5rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-label {
    font-size: 2vw;
    opacity: 0.8;
}

.detail-value {
    font-size: 2vw;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .clock-section,
    .weather-section {
        flex: none;
        min-height: 50vh;
        height: auto;
        padding: 1rem;
    }

    .time {
        font-size: 12vw;
        line-height: 0.9;
    }

    .seconds {
        font-size: 4vw;
        margin-bottom: 0.5vw;
    }

    .date {
        font-size: 3vw;
    }

    .weekday {
        font-size: 2.5vw;
    }

    .temperature {
        font-size: 8vw;
        line-height: 0.9;
    }

    .weather-description {
        font-size: 3vw;
    }

    .location {
        font-size: 2.5vw;
    }

    .last-updated {
        font-size: 1.8vw;
    }

    .detail-label,
    .detail-value {
        font-size: 2vw;
    }

    .analog-clock {
        width: min(70vh, 90vw);
        height: min(70vh, 90vw);
    }

    .setting-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    #zipcode {
        padding: 1rem 1.5rem;
        font-size: 1.5rem;
        width: 180px;
    }

    .update-btn {
        padding: 1rem 2rem;
        font-size: 1.5rem;
    }

    #current-location {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        height: auto;
        min-height: 100vh;
    }

    .clock-section,
    .weather-section {
        min-height: 50vh;
        height: auto;
        padding: 0.5rem;
    }

    .time {
        font-size: 10vw;
    }

    .seconds {
        font-size: 3.5vw;
        margin-bottom: 0.4vw;
    }

    .date {
        font-size: 2.5vw;
    }

    .weekday {
        font-size: 2vw;
    }

    .temperature {
        font-size: 6vw;
    }

    .weather-description {
        font-size: 2.5vw;
    }

    .location {
        font-size: 2vw;
    }

    .last-updated {
        font-size: 1.5vw;
    }

    .detail-label,
    .detail-value {
        font-size: 1.5vw;
    }

    .analog-clock {
        width: min(60vh, 90vw);
        height: min(60vh, 90vw);
    }

    .setting-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #zipcode {
        padding: 0.75rem 1rem;
        font-size: 1.2rem;
        width: 140px;
    }

    .update-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1.2rem;
    }

    #current-location {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .weather-display {
        padding: 1rem;
    }

    .wake-lock-status {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        flex-direction: row;
        height: 100vh;
    }

    .clock-section,
    .weather-section {
        height: 100vh;
        min-height: auto;
        padding: 1rem;
    }

    .time {
        font-size: 8vw;
    }

    .seconds {
        font-size: 3vw;
        margin-bottom: 0.3vw;
    }

    .temperature {
        font-size: 6vw;
    }

    .analog-clock {
        width: min(80vh, 80vw);
        height: min(80vh, 80vw);
    }
}

/* Loading Animation */
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}
