/* ===== Font Face ===== */
@font-face {
    font-family: sitefont;
    src: url('../fonts/sky-bold.ttf') format('truetype');
    font-display: swap;
}

/* ===== CSS Variables for theming ===== */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #45a049;
    --primary-light: #66BB6A;
    --background-gradient-start: #E8F5E9;
    --background-gradient-end: #C8E6C9;
    --card-background: #FFFFFF;
    --text-primary: #2E7D32;
    --text-secondary: #558B2F;
    --text-muted: #757575;
    --error-color: #D32F2F;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --transition-speed: 0.3s;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'sitefont', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* ===== Container & Layout ===== */
.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 1rem 0;
}

/* ===== Header ===== */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out;
}

.page-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.page-title-logo {
    max-width: 100%;
    height: auto;
    width: clamp(200px, 80vw, 500px);
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInDown 0.6s ease-out;
}

.page-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.125rem);
    color: var(--text-secondary);
    font-weight: normal;
}

/* ===== Card ===== */
.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    width: 100%;
    max-width: 500px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    animation: fadeInUp 0.6s ease-out;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 1.5rem;
    text-align: center;
}

.input-label {
    display: block;
    font-size: clamp(1rem, 3vw, 1.125rem);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: bold;
    text-align: right;
}

.input-field {
    width: 100%;
    padding: clamp(0.875rem, 3vw, 1.125rem);
    font-size: clamp(1rem, 3vw, 1.25rem);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    background: var(--background-gradient-start);
    color: var(--text-primary);
    text-align: center;
    transition: all var(--transition-speed);
    font-family: 'sitefont', 'Segoe UI', sans-serif;
    outline: none;
    margin-bottom: 1rem;
    display: block;
}

.input-field:focus {
    border-color: var(--primary-color);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    transform: scale(1.02);
}

.input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* ===== Buttons ===== */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: clamp(0.875rem, 3vw, 1.125rem) clamp(1.5rem, 5vw, 2.5rem);
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: bold;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: 'sitefont', 'Segoe UI', sans-serif;
    text-transform: none;
    box-shadow: var(--shadow-sm);
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Error/Success Messages ===== */
#ltlBox {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    clear: both;
}

.error-message {
    display: block;
    padding: 0.875rem;
    border-radius: var(--border-radius);
    font-size: clamp(0.875rem, 3vw, 1rem);
    text-align: center;
    background: #FFEBEE;
    color: var(--error-color);
    border: 1px solid var(--error-color);
    animation: fadeIn 0.4s ease-out;
    font-weight: bold;
}

/* ===== Validation Error Styling ===== */
.validation-error {
    display: inline-block;
    color: var(--error-color);
    font-size: clamp(0.875rem, 3vw, 1rem);
    margin-top: 0;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 0.75rem 1rem;
    background: #FFEBEE;
    border-radius: 8px;
    border: 1px solid var(--error-color);
    animation: fadeIn 0.3s ease-out;
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== Image Preview ===== */
.image-preview {
    margin-top: 2rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.6s ease-out;
}

/* ===== Footer ===== */
.page-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: auto;
}

.copyright {
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    opacity: 0.8;
}

/* ===== Utilities ===== */
.hidden {
    display: none !important;
}

.center {
    text-align: center;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive Design ===== */
/* Mobile First - Base styles above are for mobile */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        padding: 1.5rem;
    }

    .card {
        padding: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }

    .main-content {
        padding: 2rem 0;
    }

    .page-header {
        margin-bottom: 2.5rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        padding: 2.5rem;
    }

    .card:hover {
        transform: translateY(-6px);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .main-content {
        max-width: 700px;
    }
}

/* ===== Dark Mode Support (Optional) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --background-gradient-start: #1B5E20;
        --background-gradient-end: #2E7D32;
        --card-background: #FFFFFF;
        --text-primary: #2E7D32;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: white;
    }

    .btn,
    .page-footer {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
