:root {
    --primary-color: #6C63FF;
    --primary-dark: #554FD8;
    --secondary-color: #FF6584;
    --accent-color: #36D399;
    --warning-color: #FFB84D;
    --danger-color: #FF6584;
    --light-color: #F8F9FF;
    --dark-color: #1A1A2E;
    --gray-light: #f1f3f5;
    --gray-medium: #e9ecef;
    --gray-dark: #6c757d;
    --gradient-primary: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --gradient-admin: linear-gradient(135deg, #2A5C9A 0%, #2196F3 100%);
    --gradient-voter: linear-gradient(135deg, #36D399 0%, #4CAF50 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --sidebar-width: 280px;
    --mobile-nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: var(--gradient-primary);
    padding: 12px 0;
    box-shadow: var(--shadow-md);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    font-size: 2rem;
}

.navbar-toggler {
    border: none;
    padding: 5px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    border-radius: 30px;
    margin: 2px 5px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-2px);
}

/* ===== RESPONSIVE CONTAINER ===== */
.demo-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 80px;
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.demo-hero {
    background: linear-gradient(rgba(26, 26, 46, 0.92), rgba(108, 99, 255, 0.85)),
        url('https://images.unsplash.com/photo-1551135049-8a33b2fb2d5f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 100px 0;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 20px 0 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.demo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(108, 99, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 101, 132, 0.2) 0%, transparent 50%);
}

.demo-hero h1 {
    color: white;
    font-size: 3.2rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.demo-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.95;
    line-height: 1.8;
    position: relative;
}

/* ===== SECTION STYLES ===== */
.demo-section {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 50px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 20px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: 5px;
}

.section-title p {
    color: var(--gray-dark);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 20px auto 0;
}

/* ===== CARD STYLES ===== */
.demo-card {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 25px;
    height: 100%;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.demo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.demo-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.demo-card h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-card i {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

/* ===== INTERFACE CONTAINERS ===== */
.demo-interface {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    margin: 40px 0;
    border: 2px solid var(--gray-medium);
    box-shadow: var(--shadow-lg);
    position: relative;
    min-height: 500px;
    overflow: hidden;
}

.demo-screen {
    background-color: var(--light-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* ===== BUTTON STYLES ===== */
.btn-demo {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 8px 5px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-demo:hover::before {
    left: 100%;
}

.btn-demo:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.btn-demo:active {
    transform: translateY(-2px);
}

.btn-secondary-demo {
    background: var(--gray-dark);
    color: white;
}

.btn-secondary-demo:hover {
    background: #5a6268;
}

.btn-admin {
    background: var(--gradient-admin);
}

.btn-voter {
    background: var(--gradient-voter);
}

/* ===== ADMIN INTERFACE STYLES ===== */
.admin-interface {
    position: relative;
    min-height: 500px;
}

.admin-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--gradient-admin);
    color: white;
    padding: 30px 20px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: 5px 0 20px rgba(42, 92, 154, 0.2);
    z-index: 10;
    transition: transform 0.3s ease;
}

.admin-sidebar .logo {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .logo i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.admin-sidebar .logo span {
    font-size: 1.8rem;
    font-weight: 900;
}

.admin-sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.admin-sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.admin-sidebar .nav-link:hover::before {
    left: 100%;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(10px);
}

.admin-sidebar .nav-link i {
    width: 25px;
    text-align: center;
    font-size: 1.2rem;
}

.admin-main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 500px;
    transition: margin-left 0.3s ease;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
}

.admin-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--dark-color) 30%, #2A5C9A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.admin-profile-dropdown {
    position: relative;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.admin-profile:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.admin-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-admin);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.admin-info .name {
    font-weight: 600;
    color: var(--dark-color);
}

.admin-info .room {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

/* Admin Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-admin);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #2A5C9A;
}

.stat-card i {
    font-size: 2rem;
    color: #2A5C9A;
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.2rem;
    margin: 10px 0;
    color: #2A5C9A;
}

.stat-card p {
    color: var(--gray-dark);
    font-size: 0.95rem;
}

/* Admin Table Styles */
.admin-table-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-top: 30px;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    background: #f8f9fa;
    padding: 15px;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--gray-medium);
    text-align: left;
}

.admin-table tbody tr {
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background: #f8f9ff;
    transform: translateX(5px);
}

.admin-table tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
}

/* ===== VOTER INTERFACE STYLES ===== */
.voter-interface {
    position: relative;
    min-height: 500px;
}

.voter-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--gradient-voter);
    color: white;
    padding: 30px 20px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: 5px 0 20px rgba(54, 211, 153, 0.2);
    z-index: 10;
    transition: transform 0.3s ease;
}

.voter-sidebar .logo {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.voter-sidebar .logo i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.voter-sidebar .logo span {
    font-size: 1.8rem;
    font-weight: 900;
}

.voter-sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.voter-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.voter-sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.voter-sidebar .nav-link:hover::before {
    left: 100%;
}

.voter-sidebar .nav-link:hover,
.voter-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(10px);
}

.voter-sidebar .nav-link i {
    width: 25px;
    text-align: center;
    font-size: 1.2rem;
}

.voter-main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 500px;
    transition: margin-left 0.3s ease;
}

.voter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
}

.voter-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--dark-color) 30%, #36D399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.voter-profile-dropdown {
    position: relative;
}

.voter-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.voter-profile:hover {
    box-shadow: var(--shadow-md);
    border-color: #36D399;
    transform: translateY(-2px);
}

.voter-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-voter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.voter-info .name {
    font-weight: 600;
    color: var(--dark-color);
}

.voter-info .group {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

/* Voter Dashboard Cards */
.voter-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-voter);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #36D399;
}

.dashboard-card i {
    font-size: 2.5rem;
    color: #36D399;
    margin-bottom: 20px;
    display: block;
}

.dashboard-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.dashboard-card p {
    color: var(--gray-dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Voting Cards */
.voting-position-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.voting-position-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.voting-position-card h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.candidate-item {
    background: var(--light-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.candidate-item:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateX(5px);
}

.candidate-item.selected {
    border-color: var(--accent-color);
    background: rgba(54, 211, 153, 0.05);
    box-shadow: var(--shadow-sm);
}

.candidate-info {
    flex: 1;
}

.candidate-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.candidate-votes {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    text-align: right;
    min-width: 100px;
}

/* Progress Bars */
.vote-progress {
    height: 10px;
    background-color: var(--gray-light);
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.vote-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.vote-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===== MOBILE NAVIGATION ===== */
.mobile-nav-container {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    flex: 1;
    cursor: pointer;
}

.mobile-nav-item:hover {
    background: var(--light-color);
}

.mobile-nav-item.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.mobile-nav-item i {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 5px;
}

.mobile-nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    display: block;
}

/* ===== INTERFACE SWITCHER ===== */
.interface-switcher {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.interface-btn {
    padding: 14px 30px;
    border-radius: var(--radius-xl);
    border: 2px solid var(--gray-medium);
    background: white;
    color: var(--dark-color);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    justify-content: center;
}

.interface-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.interface-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.interface-btn.admin-btn.active {
    background: var(--gradient-admin);
}

.interface-btn.voter-btn.active {
    background: var(--gradient-voter);
}

/* ===== PHASE INDICATORS ===== */
.phase-indicator {
    display: inline-block;
    padding: 10px 25px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.phase-proposal {
    background: rgba(255, 184, 77, 0.15);
    color: #FF9800;
    border: 2px solid #FF9800;
}

.phase-voting {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
    border: 2px solid #2196F3;
}

.phase-results {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

/* ===== COUNTDOWN TIMER ===== */
.countdown-timer {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: var(--light-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary-color);
}

/* ===== FOOTER ===== */
.demo-footer {
    background: linear-gradient(135deg, var(--dark-color), #2a2a4e);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
    overflow: hidden;
}

.demo-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.demo-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.demo-footer a:hover {
    color: white;
    text-decoration: underline;
    transform: translateX(5px);
}

.demo-footer .copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */

/* Large tablets and small desktops (992px - 1200px) */
@media (max-width: 1200px) {
    .demo-container {
        padding: 15px;
        margin-top: 70px;
    }

    .demo-hero {
        padding: 80px 0;
    }

    .demo-hero h1 {
        font-size: 2.8rem;
    }

    .demo-section {
        padding: 40px;
    }

    :root {
        --sidebar-width: 240px;
    }

    .admin-main-content,
    .voter-main-content {
        margin-left: 240px;
    }
}

/* Tablets (768px - 992px) */
@media (max-width: 992px) {
    .navbar-nav .nav-link {
        padding: 6px 12px !important;
        font-size: 0.9rem;
        margin: 1px 3px;
    }

    .demo-hero {
        padding: 60px 20px;
        margin: 10px 0 30px;
    }

    .demo-hero h1 {
        font-size: 2.4rem;
    }

    .demo-hero p {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .demo-section {
        padding: 30px;
        margin-bottom: 30px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Hide desktop sidebars on tablets */
    .admin-sidebar,
    .voter-sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1001;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
    }

    .admin-sidebar.active,
    .voter-sidebar.active {
        transform: translateX(0);
    }

    .admin-main-content,
    .voter-main-content {
        margin-left: 0;
        padding: 20px;
    }

    /* Show mobile navigation */
    .mobile-nav-container {
        display: block;
    }

    /* Adjust interface switcher */
    .interface-switcher {
        flex-direction: column;
        align-items: center;
    }

    .interface-btn {
        width: 100%;
        max-width: 300px;
    }

    /* Adjust dashboard grids */
    .admin-stats-grid,
    .voter-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile phones (576px - 768px) */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    .navbar-brand i {
        font-size: 1.5rem;
    }

    .demo-hero {
        padding: 50px 15px;
        border-radius: var(--radius-md);
    }

    .demo-hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .demo-hero p {
        font-size: 1rem;
        padding: 0;
    }

    .demo-container {
        padding: 10px;
        margin-top: 60px;
    }

    .demo-section {
        padding: 25px 20px;
        border-radius: var(--radius-md);
    }

    .section-title {
        margin-bottom: 30px;
    }

    .section-title h2 {
        font-size: 1.8rem;
        padding-bottom: 15px;
    }

    .section-title h2::after {
        width: 80px;
        height: 4px;
    }

    .demo-card {
        padding: 25px 20px;
    }

    .demo-card h4 {
        font-size: 1.2rem;
    }

    .demo-card i {
        font-size: 2rem;
    }

    .btn-demo {
        padding: 12px 25px;
        font-size: 0.95rem;
        margin: 5px 3px;
        width: 100%;
        max-width: 280px;
    }

    /* Admin and Voter interfaces on mobile */
    .admin-header,
    .voter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-profile,
    .voter-profile {
        width: 100%;
        justify-content: space-between;
    }

    .admin-stats-grid,
    .voter-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card,
    .dashboard-card {
        padding: 20px;
    }

    .stat-card h3,
    .dashboard-card h3 {
        font-size: 1.8rem;
    }

    .admin-table-container {
        padding: 15px;
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }

    .voting-position-card {
        padding: 20px;
    }

    .candidate-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .candidate-votes {
        text-align: left;
        min-width: auto;
        width: 100%;
    }

    /* Mobile navigation adjustments */
    .mobile-nav-item {
        padding: 8px 8px;
    }

    .mobile-nav-item i {
        font-size: 1.1rem;
    }

    .mobile-nav-item span {
        font-size: 0.7rem;
    }

    /* Countdown timer */
    .countdown-timer {
        font-size: 1.5rem;
        padding: 15px;
    }

    /* Demo interface */
    .demo-interface {
        padding: 20px;
        margin: 20px 0;
    }

    .demo-screen {
        padding: 20px;
        min-height: 300px;
    }
}

/* Small mobile phones (below 576px) */
@media (max-width: 576px) {
    .navbar {
        padding: 10px 0;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .demo-hero {
        padding: 40px 10px;
    }

    .demo-hero h1 {
        font-size: 1.8rem;
    }

    .demo-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .interface-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: auto;
    }

    .admin-sidebar,
    .voter-sidebar {
        width: 280px;
    }

    .admin-main-content,
    .voter-main-content {
        padding: 15px;
    }

    .phase-indicator {
        padding: 8px 20px;
        font-size: 0.85rem;
    }

    .countdown-timer {
        font-size: 1.3rem;
        padding: 12px;
    }

    /* Adjust mobile nav for very small screens */
    .mobile-nav-item span {
        display: none;
    }

    .mobile-nav-item i {
        font-size: 1.3rem;
        margin-bottom: 0;
    }

    .mobile-nav-item {
        padding: 12px;
    }

    /* Footer adjustments */
    .demo-footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }

    .demo-footer .row>div {
        margin-bottom: 20px;
    }
}

/* Extra small devices (below 400px) */
@media (max-width: 400px) {
    .navbar-brand span {
        display: none;
    }

    .navbar-brand i {
        margin-right: 0;
        font-size: 1.8rem;
    }

    .demo-hero h1 {
        font-size: 1.6rem;
    }

    .btn-demo {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .stat-card,
    .dashboard-card {
        padding: 15px;
    }

    .stat-card h3,
    .dashboard-card h3 {
        font-size: 1.5rem;
    }

    .admin-sidebar .nav-link,
    .voter-sidebar .nav-link {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .admin-sidebar .nav-link i,
    .voter-sidebar .nav-link i {
        font-size: 1.1rem;
    }
}

/* Landscape mode on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .demo-hero {
        padding: 40px 0;
    }

    .demo-section {
        padding: 30px;
    }

    .mobile-nav-container {
        padding: 5px 0;
    }

    .mobile-nav-item {
        padding: 5px 8px;
    }

    .mobile-nav-item i {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .mobile-nav-item span {
        font-size: 0.65rem;
    }
}

/* Print styles */
@media print {

    .navbar,
    .mobile-nav-container,
    .interface-switcher,
    .btn-demo,
    .demo-footer {
        display: none !important;
    }

    .demo-container {
        margin-top: 0;
        padding: 0;
    }

    .demo-hero,
    .demo-section,
    .demo-interface,
    .demo-screen {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }
}

/* Additional overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}