/* Custom Fonts */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/poppins-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/roboto-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/roboto-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

/* Global Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hero Section */
.hero {
    background-color: #5217CA;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    z-index: 1;
    position: relative;
}

.dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: flyUp 10s linear infinite;
    bottom: 0;
}

@keyframes flyUp {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh);
        opacity: 0;
    }
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Button Styles */
.btn-primary {
    background-color: #4f46e5;
    border-color: #4f46e5;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #6366f1;
    border-color: #6366f1;
    transform: translateY(-1px);
}

.btn-outline-secondary:hover {
    transform: translateY(-1px);
}

/* Email List Styles */
.email-list {
    max-height: 600px;
    overflow-y: auto;
}

.email-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.email-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.email-item.unread {
    background: #e0e7ff;
    border-left: 4px solid #4f46e5;
}

.email-subject {
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 5px;
}

.email-sender {
    color: #6b7280;
    font-size: 0.9em;
}

.email-time {
    color: #9ca3af;
    font-size: 0.8em;
    position: absolute;
    top: 15px;
    right: 15px;
}

.email-snippet {
    color: #4b5563;
    margin-top: 8px;
    line-height: 1.4;
}

/* Modal Styles */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Countdown Styles */
#countdown {
    color: #dc2626;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Dark Mode Styles */
.dark-mode {
    background-color: #1f2937;
    color: #f9fafb;
}

.dark-mode .card {
    background-color: #374151;
    color: #f9fafb;
}

.dark-mode .email-item {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

.dark-mode .email-item.unread {
    background: #6366f1;
}

.dark-mode .modal-content {
    background-color: #374151;
    color: #f9fafb;
}

.dark-mode .form-control {
    background-color: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

.dark-mode .form-control:focus {
    background-color: #4b5563;
    border-color: #6366f1;
    color: #f9fafb;
}

.dark-mode .text-muted {
    color: #d1d5db !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .email-time {
        position: static;
        display: block;
        margin-top: 5px;
    }

    .input-group {
        flex-direction: column;
    }

    .btn {
        margin-top: 5px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.email-item {
    animation: fadeIn 0.3s ease-out;
}

.new-email-animation {
    animation: fadeIn 0.5s ease-out, pulse 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}