/* =============================================
   RESET + BASE STYLES
============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background: linear-gradient(160deg, #0f2027, #203a43, #2c5364);
    color: white;
    padding-top: 140px;
    padding-bottom: 80px;
}

/* Smooth fade-in animation */
section {
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   MAIN CONTENT CONTAINER (WIDE LAYOUT)
============================================= */
.container {
    max-width: 900px; 
    margin: 0 auto;
    padding: 0 25px;
}

/* =============================================
   GLOBAL TEXT SPACING FIX (IMPORTANT)
============================================= */
section h1,
section h2,
section h3,
section p,
section label,
.hero-title {
    padding-left: 22px !important;
    padding-right: 22px !important;
}

/* =============================================
   CARD SPACING FIX (NO MORE TOUCHING EDGES)
============================================= */
.glass-card,
.tip-card,
.exercise-card,
.quick-card {
    width: 100%;
    margin: 0 auto 18px;
    padding: 24px;
    padding-left: 22px;   /* breathing room inside */
    padding-right: 22px;
    border-radius: 18px;

    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
}

/* =============================================
   NAVBAR
============================================= */
header {
    width: 100%;
    position: fixed;
    top: 0;
    padding: 18px 40px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: #4ED4C7;
}

nav a {
    color: white;
    margin-left: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

nav a:hover {
    color: #4ED4C7;
}

/* =============================================
   INPUTS + BUTTONS
============================================= */
label {
    display: block;
    margin-bottom: 6px;
    margin-top: 14px;
    font-size: 15px;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    color: white;
    outline: none;
}

input:focus, textarea:focus {
    border-color: #4ED4C7;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.btn {
    padding: 10px 18px;
    background: #4ED4C7;
    color: black;
    font-weight: bold;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 22px; /* align with text */
}

.btn:hover {
    background: #3fc7b9;
}

/* =============================================
   HEADINGS
============================================= */
.hero-title {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 22px;
    background: linear-gradient(90deg, #ffffff, #4ED4C7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    margin-top: 25px;
    margin-bottom: 16px;
    font-size: 30px;
    font-weight: 700;
}

/* =============================================
   TIPS & EXERCISES GRID (WIDE LAYOUT, FIXED SPACING)
============================================= */
.tips-grid, .exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;

    /* spacing from edges but still wide */
    padding-left: 22px;
    padding-right: 22px;
}

/* =============================================
   CHART
============================================= */
#sleepChart {
    background: rgba(255,255,255,0.08);
    padding: 20px;
    border-radius: 20px;
    margin-top: 25px;

    margin-left: 22px;
    margin-right: 22px;
}

/* =============================================
   SECTION DISPLAY CONTROL
============================================= */
.active-section {
    display: block;
}

section {
    display: none;
}

/* Center ONLY the 3 boxes on the Welcome page */
.welcome-actions {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.welcome-actions .quick-card {
    text-align: center;
}
