:root {
    --primary-color: #25a9e1;
    --secondary-color: #1d5dab;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #333333;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--dark-gray);
    overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.05;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 169, 225, 0.3) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    background: var(--white);
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

/* Visitor Form Card */
.visitor-form-card {
    background: var(--white);
    border-radius: 25px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin: 30px auto;
    max-width: 900px;
    position: relative;
    overflow: hidden;
}

.visitor-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: var(--light-gray);
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
    animation: slideLeft 0.6s ease;
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.6rem;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--primary-color);
}

.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 5px;
}

.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 169, 225, 0.25);
    transform: translateY(-2px);
}

/* Checkboxes */
.interest-checkbox {
    padding: 15px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.interest-checkbox:hover {
    background: rgba(37, 169, 225, 0.05);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.form-check-input {
    width: 1.3rem;
    height: 1.3rem;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 1rem;
    cursor: pointer;
    margin-left: 10px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 169, 225, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-animated {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 169, 225, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(37, 169, 225, 0);
    }
}

/* Setup Page */
.setup-card {
    background: var(--white);
    border-radius: 25px;
    box-shadow: var(--shadow);
    padding: 40px;
}

.setup-header {
    margin-bottom: 30px;
}

.setup-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: bounceIn 0.8s ease;
}

.setup-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Login Page */
.login-card {
    background: var(--white);
    border-radius: 25px;
    box-shadow: var(--shadow);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.login-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

/* Dashboard */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 30px 0;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.stats-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary-color);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stats-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stats-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.stats-label {
    color: #666;
    font-size: 1rem;
}

/* Table */
.table-container {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.custom-table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border: none;
}

.custom-table thead th:first-child {
    border-radius: 10px 0 0 10px;
}

.custom-table thead th:last-child {
    border-radius: 0 10px 10px 0;
}

.custom-table tbody tr {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.custom-table tbody tr:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(37, 169, 225, 0.2);
}

.custom-table tbody td {
    padding: 15px;
    border: none;
}

/* Badge */
.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.badge-danger {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.badge-warning {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.badge-info {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.badge-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Action Buttons */
.btn-action {
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-view {
    background: var(--primary-color);
    color: var(--white);
}

.btn-delete {
    background: var(--danger);
    color: var(--white);
}

/* Navbar */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--shadow);
}

.navbar-custom .navbar-brand {
    color: var(--white);
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 10px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    color: var(--white);
    transform: translateY(-2px);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(37, 169, 225, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: var(--white);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    animation: slideDown 0.6s ease;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounceIn 0.8s ease;
}

/* Countdown Timer */
#countdown {
    display: inline-block;
    font-weight: bold;
    font-size: 1.3em;
    color: #fff;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 50%;
    min-width: 40px;
    text-align: center;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.1);
        background: rgba(255, 255, 255, 0.5);
    }
}

.success-message .btn-light {
    background: rgba(255, 255, 255, 0.9);
    color: #11998e;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.success-message .btn-light:hover {
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .visitor-form-card {
        padding: 25px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .stats-card {
        margin-bottom: 20px;
    }
}

/* Print Styles */
@media print {
    .navbar-custom, .btn, .animated-bg {
        display: none !important;
    }
    
    .visitor-form-card, .table-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
