/* Shared CSS for Navbar and Footer */

/* Global Background Class */
.web-bg {
    background: url('/images/WebBg.png') no-repeat center center fixed !important;
    background-size: cover !important;
    position: relative !important;
}

.web-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: -1;
}

/* Dark mode support for web-bg */
@media (prefers-color-scheme: dark) {
    .web-bg::before {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
    }
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', 'Prompt', 'Kanit', Arial, sans-serif;
    min-height: 100vh;
    color: #f1f1f1;
    font-size: 16px;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 6rem 1rem 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 20px rgba(255, 179, 71, 0.8)) drop-shadow(0 0 40px rgba(255, 179, 71, 0.4));
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(255, 179, 71, 0.8)) drop-shadow(0 0 40px rgba(255, 179, 71, 0.4));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(255, 179, 71, 1)) drop-shadow(0 0 60px rgba(255, 179, 71, 0.6));
    }
}

.hero-logo img {
    width: 85px;
    height: 85px;
}

.hero-title {
    font-size: 1.7rem;
    font-weight: bold;
    color: #ffb347;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 12px #000a;
    margin-bottom: 0.3rem;
    text-align: center;
}

.hero-desc {
    font-size: 0.9rem;
    color: #f1f1f1;
    text-align: center;
    margin-bottom: 0.2rem;
    line-height: 1.4;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 0.5rem;
}

/* Dashboard Card */
.dashboard-card {
    background: #23242b;
    border-radius: 15px;
    box-shadow: 0 4px 24px #000a;
    padding: 0.8rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 110px;
    position: relative;
    overflow: hidden;
    gap: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px #000c;
}

.dashboard-card .card-img {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: contain;
    background: none;
    box-shadow: none;
    margin: 0;
    opacity: 1;
    position: static;
    z-index: 1;
    display: block;
}

.dashboard-card .card-content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-card .card-title,
.dashboard-card .card-desc,
.dashboard-card .card-btn {
    position: relative;
    z-index: 2;
}

.dashboard-card .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffb347;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dashboard-card .card-desc {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.dashboard-card .card-badge {
    display: inline-block;
    background: #ffb347;
    color: #23242b;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    margin-right: 0.4rem;
}

/* Form Styles */
.form-card {
    background: #23242b;
    border-radius: 18px;
    box-shadow: 0 8px 32px #000a;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 400px;
}

.form-card h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffb347;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e0e0e0;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #333;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #18191c;
    color: #f1f1f1;
}

.form-group input:focus {
    outline: none;
    border-color: #ffb347;
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.1);
}

.form-group input.input-validation-error {
    border-color: #dc3545;
}

.validation-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.btn {
    width: 100%;
    padding: 0.875rem;
    background: #ffb347;
    color: #23242b;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn:hover {
    background: #ffd580;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 71, 0.3);
}

.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.register-link {
    text-align: center;
    color: #e0e0e0;
}

.register-link a {
    color: #ffb347;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #75b798;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #ea868f;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .dashboard-card .card-img {
        width: 56px;
        height: 56px;
        margin-bottom: 0.5rem;
    }
}

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 6rem 1.5rem 2rem 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .dashboard-card {
        max-width: 100%;
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .btn-group {
        flex-direction: row;
        gap: 1rem;
    }

    .btn {
        min-width: 140px;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .container {
        padding: 6rem 2rem 2rem 2rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.8rem;
    }

    .dashboard-card {
        max-width: 100%;
        padding: 1.2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-desc {
        font-size: 1.05rem;
    }

    .btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .container {
        padding: 6rem 3rem 2rem 3rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }

    .dashboard-card {
        max-width: 100%;
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 2.3rem;
    }

    .hero-desc {
        font-size: 1.1rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .dashboard-card {
        box-shadow: 0 8px 32px #d6338444, 0 0 0 1px rgba(214, 51, 132, 0.1);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dashboard-card {
        background: rgba(255,255,255,0.1);
        color: #e9ecef;
    }

    .dashboard-card h1 {
        color: #f783ac;
    }
}

@media (max-width: 700px) {
    .container {
        padding: 5rem 0.5rem 1.5rem 0.5rem;
    }
    .dashboard-grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
    .dashboard-card {
        padding: 0.8rem;
        min-height: 90px;
    }
    .dashboard-card .card-img {
        flex: 0 0 80px;
        width: 80px;
        height: 80px;
    }
    .hero-title {
        font-size: 1.5rem;
    }
    .hero-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .dashboard-card {
        padding: 0.7rem;
        min-height: 80px;
    }
    .dashboard-card .card-title {
        font-size: 1rem;
    }
    .dashboard-card .card-desc {
        font-size: 0.8rem;
    }
    .dashboard-card .card-img {
        flex: 0 0 70px;
        width: 70px;
        height: 70px;
    }
    .hero-title {
        font-size: 1.4rem;
    }
    .hero-desc {
        font-size: 0.75rem;
    }
}

/* Navbar Styles */
.navbar {
    width: 100%;
    background: #18191c;
    box-shadow: 0 2px 8px #0008;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.2rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    min-height: 48px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.navbar-logo:hover {
    opacity: 0.8;
}

.navbar-logo img {
    width: 28px;
    height: 28px;
}

.navbar-logo span {
    font-size: 1.05rem;
    font-weight: bold;
    color: #ffb347;
}

.navbar-menu {
    display: flex;
    gap: 1.1rem;
    align-items: center;
}

.navbar-menu a {
    color: #ffb347;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.98rem;
    transition: all 0.2s;
    padding: 0.2rem 0.5rem;
}

.navbar-menu a:hover {
    color: #fff;
    background: #ffb34722;
}

.navbar-menu a.login-btn {
    background: #ffb347;
    color: #23242b;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-weight: bold;
}

.navbar-menu a.login-btn:hover {
    background: #ffd580;
    color: #23242b;
}

.navbar-menu .user-info {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 179, 71, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 179, 71, 0.2);
}

.navbar-menu .logout-btn {
    background: #dc3545;
    color: white;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.navbar-menu .logout-btn:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

.hamburger {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10000;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffb347;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Footer Styles */
.footer {
    width: 100%;
    text-align: center;
    padding: 1.2rem 0 0.7rem 0;
    color: #ffb347;
    font-size: 0.95rem;
    background: rgba(35,36,43,0.7);
    margin-top: 2rem;
}

/* Responsive Navbar */
@media (min-width: 768px) {
    .navbar {
        padding: 0.75rem 2rem;
    }

    .navbar-logo img {
        width: 40px;
        height: 40px;
    }

    .navbar-logo span {
        font-size: 1.3rem;
    }

    .hamburger {
        display: none;
    }

    .navbar-menu {
        display: flex;
        position: static;
        width: auto;
        background: none;
        backdrop-filter: none;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        gap: 1.5rem;
    }

    .navbar-menu a {
        padding: 0.5rem 0;
        border-bottom: none;
    }

    .navbar-menu a:hover {
        background: none;
    }
}

@media (max-width: 767px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #18191c;
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        box-shadow: -5px 0 15px #0008;
        transition: right 0.3s ease;
        gap: 0;
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-menu a {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid #333;
        font-size: 1.1rem;
    }

    .navbar-menu a:last-child {
        border-bottom: none;
    }

    .navbar-menu a.login-btn {
        margin-top: 1rem;
        text-align: center;
        border: 2px solid #ffb347;
        border-radius: 8px;
    }

    .hamburger {
        display: block;
    }
} 