/* =====================================================
   LACUPONERA - Main Public Styles
   ===================================================== */

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --card-bg: #1e293b;
    --border-color: #334155;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--text-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-light);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-light) 100%);
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h1 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hero-stats .stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Sections */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 48px;
}

/* How it Works */
.how-it-works {
    padding: 80px 0;
    background: var(--bg-light);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.step-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.step-icon .fa-whatsapp {
    color: #25D366;
}

.step-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.extra-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.info-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 4px;
}

.info-card h4 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Raffles Section */
.raffles-section {
    padding: 80px 0;
}

.raffles-section.finished {
    background: var(--bg-light);
}

.raffles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-placeholder i {
    font-size: 2rem;
    margin-bottom: 16px;
}

/* Raffle Card */
.raffle-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.raffle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.raffle-card-image {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.raffle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.raffle-card-image .placeholder-icon {
    font-size: 4rem;
    opacity: 0.3;
}

.raffle-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.raffle-badge.active {
    background: var(--success-color);
    color: white;
}

.raffle-badge.ended {
    background: var(--secondary-color);
    color: white;
}

.raffle-card-content {
    padding: 20px;
}

.raffle-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.raffle-card-prize {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--warning-color);
    font-weight: 600;
    margin-bottom: 12px;
}

.raffle-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.raffle-card-host {
    display: flex;
    align-items: center;
    gap: 6px;
}

.raffle-card-footer {
    display: flex;
    gap: 10px;
}

.raffle-card-footer .btn {
    flex: 1;
    justify-content: center;
}

/* Winner Display */
.winner-info {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.winner-info .winner-label {
    font-size: 0.75rem;
    color: var(--success-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.winner-info .winner-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--gradient-primary);
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-color);
}

.cta-section .btn-primary:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-icon {
    font-size: 2rem;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 12px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

.footer-links a,
.footer-contact a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-contact a i {
    width: 20px;
    margin-right: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Login Dropdown */
.login-dropdown {
    position: relative;
}

.login-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1001;
    margin-top: 8px;
}

.login-dropdown:hover .dropdown-menu,
.login-dropdown .dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-color) !important;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--primary-light);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* Login Modal Styles */
.modal-description {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.8;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 8px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    border-radius: 8px;
    color: var(--danger-color);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-color: var(--success-color);
}

.toast.success::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

.toast.error {
    border-color: var(--danger-color);
}

.toast.error::before {
    content: '✕';
    color: var(--danger-color);
    font-weight: bold;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .hero-stats .stat-number {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .raffles-grid {
        grid-template-columns: 1fr;
    }
    
    .login-dropdown .dropdown-menu {
        position: fixed;
        left: 20px;
        right: 20px;
        width: auto;
    }
}
