/* Modern Theme for Lands of Illithia - Public Pages */
/* Version: 1.0.0 */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, sans-serif;
    background: #0d0d0d url('../theme/bg-hexagon.png') center top;
    background-attachment: fixed;
    color: #c8c8c8;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(13,13,13,0.4) 0%, rgba(13,13,13,0.85) 100%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(139, 0, 0, 0.3);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    padding: 18px 0;
    transition: all 0.3s ease;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    font-weight: 900;
    color: #b8b8b8;
    letter-spacing: 3px;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

.logo:hover {
    color: #d4d4d4;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    color: #999;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: #c9a86a;
}

.btn {
    padding: 12px 28px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 13px;
    letter-spacing: 1.5px;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, #8b0000 0%, #5a0000 100%);
    color: #e8e8e8;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid #3a0000;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a00000 0%, #6a0000 100%);
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background: linear-gradient(135deg, #c9a86a 0%, #9d7f4f 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(201, 168, 106, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid #7d6040;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #d4b680 0%, #ab8e5d 100%);
    box-shadow: 0 4px 20px rgba(201, 168, 106, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Main Content */
main {
    margin-top: 100px;
    padding: 60px 0;
    min-height: 60vh;
}

.page-header {
    text-align: center;
    margin-bottom: 80px;
}

.page-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 56px;
    font-weight: 900;
    color: #d4d4d4;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: 2px;
}

.page-header p {
    font-size: 18px;
    color: #888;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 300;
}

.page-header p em {
    font-style: italic;
}

.intro-section {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid rgba(80, 80, 80, 0.3);
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.intro-section p {
    font-size: 16px;
    color: #999;
    line-height: 1.9;
    font-weight: 300;
}

.intro-section a {
    color: #c9a86a;
    text-decoration: none;
    font-weight: 500;
}

.intro-section a:hover {
    text-decoration: underline;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.content-section {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid rgba(80, 80, 80, 0.3);
    padding: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.content-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: #c9a86a;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: 1px;
}

.content-section p {
    font-size: 16px;
    line-height: 1.9;
    color: #999;
    margin-bottom: 20px;
    font-weight: 300;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.content-section ul {
    list-style: none;
    padding: 0;
}

.content-section li {
    font-size: 15px;
    line-height: 1.8;
    color: #999;
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    font-weight: 300;
}

.content-section li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #c9a86a;
}

/* Race Cards */
.races-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.race-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid rgba(80, 80, 80, 0.3);
    padding: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.race-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    color: #c9a86a;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

.race-card p {
    font-size: 16px;
    line-height: 1.9;
    color: #999;
    margin-bottom: 20px;
    font-weight: 300;
}

.race-card p:last-child {
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.2) 0%, rgba(80, 80, 80, 0.1) 100%);
    border: 1px solid rgba(139, 0, 0, 0.3);
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cta-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    color: #d4d4d4;
    margin-bottom: 20px;
    font-weight: 900;
    letter-spacing: 2px;
}

.cta-section p {
    font-size: 17px;
    color: #888;
    margin-bottom: 35px;
    font-weight: 300;
}

.contact-section {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.2) 0%, rgba(80, 80, 80, 0.1) 100%);
    border: 1px solid rgba(139, 0, 0, 0.3);
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.contact-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: #d4d4d4;
    margin-bottom: 15px;
    font-weight: 900;
    letter-spacing: 2px;
}

.contact-section p {
    font-size: 16px;
    color: #888;
    font-weight: 300;
}

.contact-section a {
    color: #c9a86a;
    text-decoration: none;
    font-weight: 500;
}

.contact-section a:hover {
    text-decoration: underline;
}

.closing-section {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.2) 0%, rgba(80, 80, 80, 0.1) 100%);
    border: 1px solid rgba(139, 0, 0, 0.3);
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.closing-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: #d4d4d4;
    margin-bottom: 15px;
    font-weight: 900;
    letter-spacing: 2px;
}

.closing-section p {
    font-size: 16px;
    color: #888;
    font-weight: 300;
}

/* Footer */
footer {
    padding: 70px 0 30px;
    border-top: 1px solid rgba(139, 0, 0, 0.2);
    background: rgba(5, 5, 5, 0.6);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.8);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h4 {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    margin-bottom: 25px;
    color: #b8b8b8;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-section a {
    display: block;
    color: #666;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    font-size: 14px;
    font-weight: 300;
}

.footer-section a:hover {
    color: #c9a86a;
}

.footer-section p {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
    font-weight: 300;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(80, 80, 80, 0.2);
    color: #555;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .logo {
        font-size: 1.4rem;
    }

    .page-header h1 {
        font-size: 36px;
    }

    .page-header p {
        font-size: 16px;
    }

    main {
        padding: 2rem 1rem;
    }

    .content-section {
        padding: 30px 20px;
    }

    .intro-section {
        padding: 30px 20px;
    }

    .contact-section {
        padding: 30px 20px;
    }

    .cta-section {
        padding: 40px 20px;
    }

    .cta-section h2 {
        font-size: 28px;
    }

    .closing-section {
        padding: 30px 20px;
    }

    .races-grid {
        grid-template-columns: 1fr;
    }

    .race-card {
        padding: 30px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Email Obfuscation Helper */
.email-link {
    unicode-bidi: bidi-override;
    direction: rtl;
}

/* Login Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    width: 100%;
    max-width: 450px;
    position: relative;
    padding: 40px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: #c9a86a;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.modal-header p {
    color: #888;
    font-size: 14px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #c9a86a;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: 2px;
    color: #c8c8c8;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #c9a86a;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.1);
}

.form-group input::placeholder {
    color: #555;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 25px;
}

.form-footer a {
    color: #c9a86a;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #d4b87a;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #8b0000 0%, #660000 100%);
    color: white;
    border: none;
    border-radius: 2px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #a00000 0%, #750000 100%);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
    transform: translateY(-1px);
}

.modal-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.modal-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(139, 0, 0, 0.2);
}

.modal-divider span {
    background: #0d0d0d;
    padding: 0 15px;
    color: #666;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.btn-register-alt {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #c9a86a;
    border: 1px solid rgba(201, 168, 106, 0.3);
    border-radius: 2px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-register-alt:hover {
    background: rgba(201, 168, 106, 0.1);
    border-color: #c9a86a;
}

/* Alpine.js Cloak */
[x-cloak] {
    display: none !important;
}

/* Modal Mobile Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 25px;
        max-width: 100%;
    }

    .modal-header h2 {
        font-size: 24px;
    }
}
