/* css/style.css - PRODUCTION DARK MODE v3.2 */

/* === CSS VARIABLES (THEME SYSTEM) === */
:root {
    --bg-primary: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bg-secondary: #ffffff;
    --bg-card: rgba(255,255,255,0.95);
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow: rgba(0,0,0,0.08);
    --shadow-lg: rgba(0,0,0,0.12);
    --accent: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
}

/* DARK THEME */
[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --bg-secondary: #1e293b;
    --bg-card: rgba(30,41,59,0.95);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #475569;
    --shadow: rgba(0,0,0,0.4);
    --shadow-lg: rgba(0,0,0,0.6);
    --accent: #60a5fa;
    --success: #34d399;
    --warning: #fbbf24;
}

/* === BASE === */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* === LANDING PAGE === */
.welcome {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.welcome > div {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 60px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px var(--shadow-lg);
    max-width: 700px;
    border: 1px solid var(--border-light);
}

.welcome h1 { 
    font-size: clamp(2.5rem, 8vw, 5rem); 
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 24px 0;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.welcome p { 
    color: var(--text-secondary); 
    font-size: clamp(1.1em, 3vw, 1.4em); 
    margin: 0 0 40px 0;
    max-width: 600px;
}

.enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: clamp(1.1em, 3vw, 1.3em);
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(59,130,246,0.4);
    border: none;
    cursor: pointer;
}

.enter-btn:hover { 
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59,130,246,0.5);
}

/* === NAVIGATION === */
.back-btn, .calendar-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95em;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px var(--shadow);
}

.back-btn:hover, .calendar-nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-lg);
    border-color: var(--accent);
    color: var(--accent);
}

.calendar-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 32px 0;
}

/* === CALENDAR === */
.calendar-container {
    max-width: 1000px;
    margin: 24px auto;
    padding: 40px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 60px var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.calendar {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
    border: 1px solid var(--border);
}

.calendar table { width: 100%; border-collapse: collapse; }
.calendar th {
    background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
    color: white;
    padding: 18px 12px;
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar td {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0;
    height: 80px;
    vertical-align: top;
}

.calendar td:last-child { border-right: none; }
.calendar td.empty { background: var(--border-light) !important; }

.calendar td.day a {
    display: block;
    padding: 16px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.25s ease;
    position: relative;
}

.calendar td.day a:hover {
    background: var(--border-light);
    color: var(--text-primary);
    transform: scale(1.08);
}

.has-post a {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}

.calendar td.day.today a {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%) !important;
    color: #1f2937 !important;
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}

/* === POSTS === */
.post-container { max-width: 1000px; margin: 24px auto; padding: 40px; }
.post {
    background: var(--bg-card);
    padding: 60px;
    border-radius: 24px;
    box-shadow: 0 25px 60px var(--shadow-lg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
}

.post h1 {
    color: var(--text-primary);
    border-bottom: 4px solid var(--accent);
    padding-bottom: 20px;
    margin-bottom: 30px;
    font-weight: 800;
}

.post-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 15px;
    margin: 24px 0;
    padding: 16px;
    background: var(--border-light);
    border-radius: 12px;
}

.post-content {
    line-height: 1.8;
    font-size: 1.15em;
    color: var(--text-primary);
}

.no-post {
    text-align: center;
    padding: 100px 60px;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 20px 60px var(--shadow-lg);
    border: 1px solid var(--border-light);
    max-width: 600px;
    margin: 40px auto;
}

.create-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 22px 56px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(16,185,129,0.4);
    transition: all 0.3s ease;
}

.create-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(16,185,129,0.5);
}

/* === FORMS === */
.admin-container {
    max-width: 1000px;
    margin: 24px auto;
    padding: 50px;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 25px 60px var(--shadow-lg);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
}

.form-group { margin-bottom: 36px; }
label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.1em;
}

input[type="text"], input[type="password"], textarea, select {
    width: 100%;
    padding: 20px 24px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
    transform: translateY(-1px);
}

.save-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
    color: white;
    padding: 22px 56px;
    border: none;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(59,130,246,0.4);
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(59,130,246,0.5);
}

.message {
    padding: 24px 32px;
    margin: 24px 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.05) 100%);
    color: var(--success);
    border: 1px solid rgba(16,185,129,0.2);
    font-weight: 600;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .calendar-container, .post-container, .admin-container { padding: 30px 24px; }
}

@media (max-width: 768px) {
    .calendar td { height: 65px; }
    .calendar th, .calendar td { font-size: 14px; }
    .welcome > div { padding: 40px 24px; }
    .post, .admin-container { padding: 40px 24px; }
}

@media (max-width: 480px) {
    .calendar-nav { flex-direction: column; gap: 12px; }
    .back-btn, .calendar-nav a { width: 100%; justify-content: center; }
    .post-meta { flex-direction: column; gap: 8px; text-align: center; }
}
