/* ============================================
   Campaign Volunteer Network App
   Blue-Purple Gradient Theme
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hover: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #6c63ff;
    --accent: #e040fb;
    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --text-white: #ffffff;
    --border: #dfe6e9;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Poppins', sans-serif;
    --whatsapp: #25D366;
    --facebook: #1877F2;
    --telegram: #0088CC;
    --instagram: #E4405F;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Gradient Background ---- */
.bg-gradient { background: var(--gradient) !important; }
.bg-gradient-hover:hover { background: var(--gradient-hover) !important; }

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

/* ---- Buttons ---- */
.btn-gradient {
    background: var(--gradient);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.btn-gradient:hover {
    background: var(--gradient-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.45);
}

.btn-gradient:active { transform: translateY(0); }

/* Platform Buttons */
.btn-whatsapp { background: var(--whatsapp); color: white; border: none; }
.btn-whatsapp:hover { background: #1da851; color: white; transform: translateY(-2px); }

.btn-facebook { background: var(--facebook); color: white; border: none; }
.btn-facebook:hover { background: #0d65d9; color: white; transform: translateY(-2px); }

.btn-telegram { background: var(--telegram); color: white; border: none; }
.btn-telegram:hover { background: #006699; color: white; transform: translateY(-2px); }

.btn-instagram { background: linear-gradient(45deg, #F09433, #E6683C, #DC2743, #CC2366, #BC1888); color: white; border: none; }
.btn-instagram:hover { opacity: 0.9; color: white; transform: translateY(-2px); }

.btn-copy-link { background: #6c757d; color: white; border: none; }
.btn-copy-link:hover { background: #5a6268; color: white; transform: translateY(-2px); }

/* ---- Navbar ---- */
.navbar.bg-gradient {
    background: var(--gradient) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar-brand { font-size: 1.3rem; letter-spacing: -0.5px; }

.navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    transition: all 0.3s;
}

.navbar .nav-link:hover { color: white !important; }

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
}

/* ---- Hero Section ---- */
.hero-section {
    background: var(--gradient);
    color: white;
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    transform: rotate(-15deg);
}

.min-vh-80 { min-height: 80vh; }

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-illustration {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-center-icon {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.floating-card {
    position: absolute;
    background: rgba(255,255,255,0.95);
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: float 3s ease-in-out infinite;
    color: var(--text);
}

.card-1 { top: 30px; left: 20px; animation-delay: 0s; }
.card-2 { top: 30px; right: 20px; animation-delay: 0.5s; }
.card-3 { bottom: 30px; left: 20px; animation-delay: 1s; }
.card-4 { bottom: 30px; right: 20px; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---- Features Section ---- */
.feature-card {
    background: white;
    padding: 30px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
}

/* ---- Stats Section ---- */
.stats-section {
    background: white;
}

.stat-item h2 { font-size: 2.5rem; }

/* ---- Auth Pages ---- */
.auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

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

.auth-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 1.5rem;
}

.auth-header h2 { font-weight: 700; margin-bottom: 5px; }
.auth-header p { color: var(--text-light); }

.auth-footer { text-align: center; margin-top: 20px; }
.auth-footer a { color: var(--primary); font-weight: 600; }

.form-control, .form-select {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-label { font-weight: 500; font-size: 0.9rem; }

/* ---- Dashboard Stats ---- */
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.3rem;
    color: white;
}

.stat-icon.blue { background: var(--primary); }
.stat-icon.purple { background: var(--primary-dark); }
.stat-icon.green { background: #00b894; }
.stat-icon.orange { background: #e17055; }

.stat-value { font-size: 1.8rem; font-weight: 800; }
.stat-label { font-size: 0.85rem; color: var(--text-light); }

/* ---- Campaign Cards ---- */
.campaign-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.campaign-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.campaign-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.campaign-card-placeholder {
    width: 100%;
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    opacity: 0.7;
}

.video-thumbnail {
    position: relative;
}

.video-thumbnail::after {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    padding-left: 3px;
}

.campaign-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.campaign-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.campaign-card-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.campaign-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.campaign-card-actions {
    margin-top: auto;
}

/* ---- Share Modal ---- */
.share-modal .modal-content {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
}

.share-modal .modal-header {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 20px 24px;
}

.share-modal .modal-title { font-weight: 700; }
.share-modal .btn-close { filter: brightness(0) invert(1); }

.share-modal .modal-body { padding: 24px; }

.share-preview {
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 14px;
}

.share-preview-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.share-preview-img-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.share-preview-info { flex: 1; min-width: 0; }

.share-preview-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-url {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 4px;
    word-break: break-all;
}

.share-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.share-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    color: white;
}

.share-option-btn:hover { transform: translateY(-2px); color: white; }

.share-option-btn.whatsapp { background: var(--whatsapp); }
.share-option-btn.facebook { background: var(--facebook); }
.share-option-btn.telegram { background: var(--telegram); }
.share-option-btn.instagram { background: linear-gradient(45deg, #F09433, #E6683C, #DC2743, #CC2366, #BC1888); }
.share-option-btn.copy-link { background: #636e72; grid-column: span 2; }

.instagram-note {
    background: #fff3e0;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #e65100;
}

.instagram-note i { margin-right: 6px; }

/* ---- Footer ---- */
.footer {
    background: var(--gradient);
    color: white;
    margin-top: auto;
}

/* ---- Dashboard Layout ---- */
.dashboard-header {
    background: var(--gradient);
    color: white;
    padding: 30px 0;
    margin-bottom: 30px;
}

.dashboard-header h1 { font-weight: 800; font-size: 1.5rem; }
.dashboard-header p { opacity: 0.85; font-size: 0.9rem; }

/* ---- Tables ---- */
.table-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-card .card-header {
    background: white;
    border-bottom: 2px solid var(--bg);
    padding: 16px 20px;
    font-weight: 700;
}

/* ---- Create Campaign Form ---- */
.create-campaign-section {
    padding: 30px 0;
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: #f0f2ff;
}

.file-upload-area i { font-size: 2rem; color: var(--primary); }
.file-upload-area p { margin-top: 10px; color: var(--text-light); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-illustration { display: none !important; }
    .stat-value { font-size: 1.4rem; }
    .share-options { grid-template-columns: 1fr; }
    .share-option-btn.copy-link { grid-column: span 1; }
    .auth-card { padding: 24px; }
    .dashboard-header h1 { font-size: 1.2rem; }
}

/* ---- Animations ---- */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.custom-toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-toast.success { background: #00b894; }
.custom-toast.error { background: #d63031; }
.custom-toast.info { background: var(--primary); }

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

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(50px); }
}

/* ---- Public Campaign Page ---- */
.campaign-hero {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.campaign-video-wrap {
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.campaign-video-wrap video {
    width: 100%;
    max-height: 450px;
    display: block;
}
