:root {
    --bg-color: #1b2631;
    --card-bg: #2c3e50;
    --primary-color: #e67e22;
    --primary-hover: #d35400;
    --text-color: #ecf0f1;
    --text-muted: #bdc3c7;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #2c3e50, #1b2631);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

.container, .auth-card {
    animation: fadeIn 0.6s ease-out;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Classes */
.glass {
    background: rgba(44, 62, 80, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

/* Common Components */
button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1rem;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

input, textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 12px;
    border-radius: var(--border-radius);
    outline: none;
    transition: var(--transition);
}

input:focus, textarea:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Auth Screens */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    text-align: center;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    user-select: none;
}

.logo-icon {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.logo-text {
    color: var(--text-color);
}

.logo-text span {
    color: var(--primary-color);
}

.auth-logo-large {
    flex-direction: column;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
}

.auth-logo-large .logo-icon {
    width: 64px;
    height: 64px;
    font-size: 2.5rem;
    border-radius: 16px;
}



.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    background: none;
    color: var(--text-muted);
}

.tab-btn.active {
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    border-radius: 0;
}

.tab-btn:hover {
    box-shadow: none;
    transform: none;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}


/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto 1fr;
    gap: 1.5rem;
    height: calc(100vh - 4rem);
}

.top-bar {
    grid-column: 1 / span 2;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer-section {
    grid-column: 1 / span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.timer-display {
    font-size: 5rem;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(230, 126, 34, 0.3);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.secondary-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Focus Mode Overlay */
.focus-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease-out;
}

.focus-overlay .timer-display {
    font-size: 15vw;
}

.exit-focus-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
}


.logs-section {
    padding: 1.5rem;
    overflow-y: auto;
}

.notes-section {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.notes-area {
    flex: 1;
    width: 100%;
    resize: none;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.goal-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeIn 0.4s ease-out backwards;
}

.goal-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: scale(1.02);
}


.goal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.goal-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.delete-goal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.delete-goal:hover {
    color: #e74c3c;
    transform: scale(1.2);
}

.delete-log {
    position: absolute;
    top: 5px;
    right: 10px;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.delete-log:hover {
    color: #e74c3c;
    transform: scale(1.2);
}



/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .timer-display {
        font-size: 3.5rem;
    }

    .top-bar {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .top-bar #userName {
        display: none;
    }

    .top-bar .logo-text {
        font-size: 1rem !important;
    }

    .top-bar h2 {
        display: none; /* Hide 'Hedef Detayı' on mobile to save space */
    }

    .top-bar .logo-container + div {
        display: none; /* Hide the separator line on mobile */
    }


    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .goal-grid {
        grid-template-columns: 1fr !important;
    }

    .notes-section {
        min-height: 400px;
    }

    .timer-section {
        margin-bottom: 1rem;
    }
}

/* Goal Status Styles */
.goal-card.completed { border-left: 5px solid #2ecc71; border-top-color: transparent; }
.goal-card.canceled { border-left: 5px solid #e74c3c; border-top-color: transparent; }

.goal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    padding: 8px;
    font-size: 0.85rem;
    border-radius: 6px;
    color: white;
    font-weight: 600;
}

.btn-complete { background: #2ecc71; }
.btn-complete:hover { background: #27ae60; }
.btn-cancel { background: #e74c3c; }
.btn-cancel:hover { background: #c0392b; }

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#statsTotal { color: #3498db; }
#statsActive { color: #f1c40f; }
#statsCompleted { color: #2ecc71; }
#statsCanceled { color: #e74c3c; }

.archive-header {
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
}

/* Clock Timer Styles */
.clock-container {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 8px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock-face {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
}

.clock-number {
    position: absolute;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    color: var(--text-color);
    font-size: 1.1rem;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom;
    transform: translateX(-50%) rotate(0deg);
    border-radius: 10px;
    transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44); /* Smooth tick */
}

.hour-hand {
    width: 6px;
    height: 50px;
    background: var(--text-color);
    z-index: 3;
}

.minute-hand {
    width: 4px;
    height: 70px;
    background: #bdc3c7;
    z-index: 4;
}

.second-hand {
    width: 2px;
    height: 80px;
    background: #e74c3c;
    z-index: 5;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    border: 3px solid #e74c3c;
    z-index: 6;
}
