/* LORDS Admin Panel - Premium Login Page */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #10b981;
    --error: #ef4444;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 40px 80px rgba(0, 0, 0, 0.25);
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    color: white;
    padding: 40px 40px 30px;
    text-align: center;
    position: relative;
    overflow: visible;
    margin-top: 40px;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-header p {
    font-size: 13px;
    opacity: 0.95;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.header-image {
    max-width: 40px;
    height: 40px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-content {
    padding: 50px 40px 40px;
}

.login-content h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 700;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 35px;
    line-height: 1.5;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-light);
    color: var(--text-dark);
}

.form-group input::placeholder {
    color: #cbd5e1;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    letter-spacing: 0.3px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.45);
}

.login-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* Message Alert */
.message {
    display: none;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 15px;
    border-left: 4px solid;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #d1f2d9;
    color: #065f46;
    border-left-color: var(--success);
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: var(--error);
}

.message.warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: var(--accent);
}

.login-footer {
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    padding: 20px 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        max-width: 100%;
        border-radius: 16px;
    }

    body::before,
    body::after {
        width: 400px;
        height: 400px;
    }

    .login-header {
        padding: 50px 30px 40px;
    }

    .login-header h1 {
        font-size: 32px;
    }

    .login-header p {
        font-size: 12px;
    }

    .login-content {
        padding: 40px 30px 35px;
    }

    .login-content h2 {
        font-size: 24px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .form-group input,
    .form-group select {
        padding: 16px 14px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .login-btn {
        padding: 16px 20px;
        font-size: 16px;
    }

    .login-footer {
        padding: 16px 30px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .login-header h1 {
        font-size: 28px;
    }

    .login-content h2 {
        font-size: 22px;
    }

    .login-content {
        padding: 35px 25px 30px;
    }

    .login-header {
        padding: 45px 25px 35px;
    }
}

    border-left: 4px solid var(--success);
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.message.warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.login-footer {
    background: var(--bg-light);
    padding: 15px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        max-width: 100%;
        border-radius: 10px;
    }

    .login-header {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-content {
        padding: 30px 20px;
    }

    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .login-btn,
    .register-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Dashboard and General Styles */
.topbar {
    padding: 26px 32px;
    background: linear-gradient(90deg, #dbeafe, #ecfeff);
    border-bottom: 1px solid #dbe7f5;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

.topbar h1 {
    margin: 0 0 8px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.topbar p {
    margin: 0;
    color: #64748b;
}

.container {
    padding: 22px 26px;
}

.card,
.box {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
    padding: 20px;
    margin-bottom: 18px;
}

header {
    padding: 26px 32px;
    background: linear-gradient(90deg, #dbeafe, #ecfeff);
    border-bottom: 1px solid #dbe7f5;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

header div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0 0 8px;
    font-size: 30px;
    letter-spacing: -0.03em;
}

header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

main {
    padding: 22px 26px;
}

section.editor {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

#form {
    margin-top: 20px;
}

textarea {
    width: 100%;
    min-height: 400px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

#saveBtn {
    float: right;
    margin-top: -46px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 9px 22px rgba(37, 99, 235, 0.25);
}

#saveBtn:hover {
    filter: brightness(1.06);
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

label {
    display: block;
    font-weight: 600;
    margin: 12px 0 8px;
    color: var(--text-dark);
}

.hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

#toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    display: none;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#toast.success {
    background: var(--success);
}

#toast.error {
    background: var(--error);
}

#toast.warning {
    background: var(--warning);
}
