:root {
    --bg-color: #f0f4f8;
    --text-main: #2d3748;
    --text-muted: #718096;
    
    /* User preferences: Green for confirm, Blue for reject/clear */
    --primary-color: #38A169; /* Beautiful Green */
    --primary-hover: #2F855A;
    --secondary-color: #3182CE; /* Beautiful Blue */
    --secondary-hover: #2B6CB0;
    
    --glass-bg: rgba(255, 255, 255, 0.90);
    --glass-border: rgba(255, 255, 255, 1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --blob-1: #ffd1ff;
    --blob-2: #c4f1f9;
    --blob-3: #fefcbf;
}

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

body {
    font-family: 'Inter', sans-serif;
    /* Metallic / Gym light background */
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #f1f5f9 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed from center to allow normal scrolling on long content */
    padding: 2rem 0; /* Prevents touching the top/bottom edges */
    overflow-x: hidden;
    position: relative;
}

/* Gym floor / Metallic texture overlay */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* AI Generated Gym Interior Background */
    background-image: url('file:///C:/Users/pc/.gemini/antigravity/brain/9eb6f0b3-6fed-45c1-9126-73d2d6863ce0/bg_gym_interior_1782835906264.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6; /* Increased opacity to make the image more visible */
    filter: blur(1px) brightness(0.95); /* Significantly reduced blur to make the gym clear, slightly dimmed for text readability */
    transition: background-image 0.5s ease-in-out; /* Smooth transition between screens */
}

/* Hide old blobs but keep structure if needed */
.blob {
    display: none;
}

.app-container {
    width: 100%;
    max-width: 500px;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    text-align: center;
    margin-bottom: 1rem;
}

header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: -0.8rem;
    letter-spacing: 1px;
}

.text-blue {
    color: var(--secondary-color);
    text-shadow: 
        -1.5px -1.5px 0 #fff,  
         1.5px -1.5px 0 #fff,
        -1.5px  1.5px 0 #fff,
         1.5px  1.5px 0 #fff,
         2px 3px 5px rgba(0,0,0,0.4);
}

.text-green {
    color: var(--primary-color);
    text-shadow: 
        -1.5px -1.5px 0 #fff,  
         1.5px -1.5px 0 #fff,
        -1.5px  1.5px 0 #fff,
         1.5px  1.5px 0 #fff,
         2px 3px 5px rgba(0,0,0,0.4);
}

header p {
    color: #ffffff; /* Changed to white for better visibility */
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); /* Added soft shadow to ensure it stands out over any background */
}

/* Glass Panel styling */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 1.2rem;
}

.input-group-row {
    display: flex;
    gap: 1rem;
}

.input-group-row .input-group {
    flex: 1;
}

.input-group {
    margin-bottom: 0.8rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    line-height: 1.5;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Premium shine effect on hover */
.btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::after {
    transform: rotate(45deg) translateX(100%);
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, #48BB78 0%, #38A169 100%); /* Beautiful Green Gradient */
    color: white;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2); /* Outer shadow + Inner highlight */
    flex: 2; /* Make the primary button larger */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #38A169 0%, #2F855A 100%);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.btn-secondary {
    background: linear-gradient(135deg, #4299E1 0%, #3182CE 100%); /* Beautiful Blue Gradient */
    color: white;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #3182CE 0%, #2B6CB0 100%);
    box-shadow: 0 8px 25px rgba(49, 130, 206, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.btn-icon {
    flex: none;
    background: transparent;
    color: var(--primary-color); /* Bolder color */
    padding: 0.5rem;
    box-shadow: none;
    border: 1px solid transparent;
}

.btn-icon:hover {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Dashboard specific */
.dashboard-header {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
}

.header-titles {
    display: inline-block;
}

.dashboard-header h2.section-title {
    font-size: clamp(2rem, 8.5vw, 3.4rem); /* Responsive fluid typography */
    color: var(--text-main);
    white-space: nowrap; /* Ensure it stays on one line */
}

.stats-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.2rem; /* Compact padding */
    margin-bottom: 0.8rem; 
    border-radius: 12px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: inline-block;
    margin-right: 0.3rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.workout-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Pencereler (kartlar) birbirine daha yakın */
}

.exercise-card-wrapper {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s forwards;
    position: relative;
    cursor: pointer;
}

.exercise-card-wrapper:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(56, 161, 105, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: rgba(56, 161, 105, 0.4);
}

.exercise-card {
    padding: 1.2rem;
    position: relative;
}

.card-header-content {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* Reduced gap to save space */
    position: relative;
    z-index: 1;
    height: 75px; /* Strict fixed height guarantees pixel-perfect identical cards */
}

.exercise-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    background-size: 150px;
    background-position: right -20px bottom -20px;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
}

.bg-gym-1::after { background-image: url('./images/bg_dumbbell.png'); }
.bg-gym-2::after { background-image: url('./images/bg_kettlebell.png'); }
.bg-gym-3::after { background-image: url('./images/bg_plate.png'); }

.exercise-card-wrapper:hover .exercise-card::after {
    opacity: 0.4;
}

.expand-icon {
    color: var(--primary-color);
    transition: transform 0.3s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-left: -0.5rem; /* pull slightly towards the thumbnail */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.exercise-card-wrapper:hover .expand-icon {
    background: rgba(255, 255, 255, 0.9);
}

.exercise-card-wrapper.expanded .expand-icon {
    transform: rotate(180deg);
}

.card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.exercise-card-wrapper.expanded .card-body {
    max-height: 500px;
    transition: max-height 0.5s ease-in-out;
}

.card-body-content {
    padding: 1.2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.card-body-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-body-content p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-main);
}

.expanded-image {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.expanded-image img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

/* Ensure content stays above the watermark */
.exercise-animation, .exercise-details, .exercise-calories {
    position: relative;
    z-index: 1;
}

@keyframes slideUp {
    to { opacity: 1; }
}

.exercise-animation {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(56, 161, 105, 0.2);
}

.exercise-animation img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Fallback css animation if no image */
.dummy-anim {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1s infinite alternate;
}
@keyframes bounce {
    from { transform: translateY(-8px) scale(0.9); }
    to { transform: translateY(8px) scale(1.1); }
}

.exercise-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0; /* CRITICAL: Allows flex child to shrink properly */
}

.exercise-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.exercise-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.meta-tag {
    background: rgba(49, 130, 206, 0.1);
    color: var(--secondary-hover);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.exercise-calories {
    background: rgba(229, 62, 62, 0.1); /* Red tint for calories */
    color: #E53E3E;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem; /* Slightly smaller for mobile */
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    flex-shrink: 0; /* Prevents text cutoff */
}
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    transform: translateX(5px) scale(1.01);
    box-shadow: 0 5px 15px rgba(56, 161, 105, 0.15);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.disclaimer {
    background: rgba(237, 137, 54, 0.1);
    color: #DD6B20;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.5rem;
    line-height: 1.3;
}

.disclaimer svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Calendar & Actions */
.calendar-panel {
    margin-bottom: 0.8rem;
    text-align: center;
    padding: 0.5rem; /* Super compact padding */
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    padding: 0 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.1rem;
    margin-bottom: 0.2rem;
}

.calendar-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.calendar-day-name {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
}

.calendar-circle {
    width: 22px; /* Ultra compact circle */
    height: 22px; 
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem; 
    color: transparent;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.calendar-day.completed .calendar-circle {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.3);
}

.calendar-day.today:not(.completed) .calendar-circle {
    border-color: var(--primary-color);
    background: white;
}

.calendar-subtitle {
    font-size: 0.7rem; 
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.action-panel {
    margin-top: 2rem; /* Reduced to pull the button slightly higher */
    text-align: center;
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8rem;
    text-align: center;
    margin: 1.5rem 0 1rem 0;
    line-height: 1;
}

.btn-large {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    border-radius: 15px;
}

.glow-effect {
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    from { box-shadow: 0 4px 15px rgba(56, 161, 105, 0.4); }
    to { box-shadow: 0 8px 25px rgba(56, 161, 105, 0.8); }
}

@media (max-width: 480px) {
    .app-container {
        padding: 1rem;
    }
    .input-group-row {
        flex-direction: column;
        gap: 0;
    }
    /* stats-panel is no longer switched to column, keeps row layout */
}
