:root {
    --bg-color: #343434;
    --card-bg: #1a1a1a;
    --accent-color: #ffffff;
    --text-dim: #cacaca;
}

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

body {
    background-color: var(--bg-color);
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

/* --- Header & Greeting (Left Aligned) --- */
.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 10px 40px 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    /* Set all children to left align */
    text-align: left !important;
}

.user-greeting-box h2 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left !important; /* Force left alignment */
}

#dynamic-greeting {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    text-align: left !important; /* Force left alignment */
}

/* --- Command Box Layout (Time + Circles) --- */
.command-box {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

#local-time {
    font-size: 0.9rem; /* Slightly smaller to fit the long line */
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    margin-bottom: 10px;
    white-space: wrap; /* Prevents text from breaking into two lines */
    overflow: hidden;
    text-overflow: ellipsis; /* Adds "..." if the phone is super narrow */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

/* --- The Compact Circle Glass Vibe --- */
.weather-circles-container {
    display: flex;
    justify-content: flex-start;
    gap: 12px; /* Tighter gap for mobile */
    flex-wrap: wrap; 
}

.glass-bubble {
    width: 85px; 
    height: 85px; 
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* Prevents them from squishing into ovals */
}

/* Slimming the internal text/icons for the smaller circles */
.glass-bubble .icon {
    font-size: 1.5rem; /* Smaller icon */
    margin-bottom: 2px;
}

.bubble-content span:first-child {
    display: block;
    font-size: 1rem; /* Smaller main text (e.g., 27°C) */
    font-weight: 700;
    color: white;
}

.bubble-content span:last-child {
    display: block;
    font-size: 0.5rem; /* Tiny label text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    opacity: 0.8;
}

.preview-area {
    display: flex;
    gap: 60px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    margin-top: 50px;
}

/* The Card Vibe - Smaller & Photo Ready */
.quote-card {
    background: var(--card-bg);
    background-size: cover;
    background-position: center;
    width: 250px;  /* Smaller size */
    height: 300px; /* Compact height */
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /*border: 1px solid rgba(255, 255, 255, 0.1);*/
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* Dark overlay so text stays readable over photos */
.quote-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

/* Keep content above the dark overlay */
.card-date, .quote-text, .author-badge {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* Tilt Logic */
#card1 {
    transform: rotate(-10deg);
    margin-right: -15px;
}

#card2 {
    transform: rotate(10deg);
    margin-top: 30px;
}

/* Straighten on hover */
.quote-card:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.card-date {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.quote-text {
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 500;
    font-style: italic;
    text-align: center;
}

.author-badge {
    position: absolute;
    bottom: 40px;
    right: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-dim);
}

/* Buttons */
.controls button {
    background: white;
    color: black;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
    transition: transform 0.2s ease;
}

.controls button:hover {
    transform: scale(1.05);
}

#download-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
}
.download-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.save-btn {
    background: transparent !important;
    border: 1px solid white !important;
    color: white !important;
    font-size: 0.7rem !important;
}

.save-btn:hover {
    background: white !important;
    color: black !important;
}

/* Disable blue highlights and text selection on the whole app */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow typing in inputs even with selection disabled */
input {
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Lockscreen Full Page Overlay */
#lockscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Ensures the box never touches the screen edges */
    transition: opacity 0.5s ease;
}

.lock-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 320px; /* Keeps it tight on both phone and desktop */
}

.lock-box h2 {
    font-size: 1.2rem; /* Scaled down to fit one line on small screens */
    margin-bottom: 8px;
    letter-spacing: 1px;
    white-space: nowrap; /* Forces one line */
}

.lock-box p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 5px;
}

#user-name {
    display: block;
    width: 90%;
    margin: 10px auto 15px auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    color: white;
    text-align: center;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s ease;
}

.pass-wrapper {
    position: relative;
    width: 80%;
    margin: 10px auto 20px auto;
}

#passcode-input {
    display: block;
    width: 100%; /* Now fills the wrapper */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 20px;
    color: white;
    text-align: center;
    font-size: 1.4rem;
    letter-spacing: 4px;
    outline: none;
}

#toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.0rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#toggle-pass:hover {
    opacity: 1;
}

.lock-box button {
    background: white;
    color: black;
    border: none;
    padding: 12px 10px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    width: 50%; /* Easier to tap on mobile */
    transition: transform 0.2s ease;
}

.lock-box button:active {
    transform: scale(0.95); /* Feedback when tapped */
}

#lock-msg {
    margin-top: 15px;
    font-size: 0.75rem;
    color: #ff4d4d;
}
