:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 20px;
    color: white;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.header-content h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.event-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    min-width: 200px;
}

.stat i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.form-card, .info-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow);
}

.form-card h2, .info-card h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: white;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.number-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.number-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-light);
    background: white;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.number-input input {
    text-align: center;
    font-weight: 600;
    border-color: var(--primary);
    background: var(--light);
}

.status-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.status-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--gray-light);
    background: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.status-btn[data-status="attending"]:hover:not(.active) {
    border-color: var(--success);
    color: var(--success);
}

.status-btn[data-status="maybe"]:hover:not(.active) {
    border-color: var(--warning);
    color: var(--warning);
}

.status-btn[data-status="not-attending"]:hover:not(.active) {
    border-color: var(--danger);
    color: var(--danger);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Event Details */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.detail i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 3px;
}

.detail strong {
    display: block;
    color: var(--dark);
    margin-bottom: 5px;
}

.detail p {
    color: var(--gray);
    font-size: 0.95rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
}

/* Guest Section */
.guest-section {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 1rem;
}

.filter-dropdown select, .sort-dropdown select {
    padding: 12px 35px 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 1rem;
    background: white url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 10px center;
    background-size: 20px;
    appearance: none;
    min-width: 150px;
}

.export-btn {
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background: var(--primary-dark);
}

/* Guest List */
.guest-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.guest-card {
    background: var(--light);
    border-radius: 15px;
    padding: 25px;
    border-left: 5px solid var(--primary);
    transition: var(--transition);
    position: relative;
}

.guest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.guest-card.attending {
    border-left-color: var(--success);
}

.guest-card.maybe {
    border-left-color: var(--warning);
}

.guest-card.not-attending {
    border-left-color: var(--danger);
}

.guest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.guest-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
}

.guest-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-attending {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-maybe {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-not-attending {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.guest-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.guest-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 0.95rem;
}

.guest-detail i {
    color: var(--primary);
    width: 20px;
}

.guest-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.delete-btn {
    padding: 8px 15px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.delete-btn:hover {
    background: #dc2626;
}

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

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--gray);
}

/* Loading Spinner */
.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.toast {
    background: var(--dark);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.toast.success {
    background: var(--success);
}

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

.toast.warning {
    background: var(--warning);
}

.toast.info {
    background: var(--primary);
}

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

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

.toast.fade-out {
    animation: slideOut 0.3s ease forwards;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 30px;
}

.confirmation-details {
    background: var(--light);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.backup-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.backup-section {
    padding: 20px;
    background: var(--light);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.backup-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--dark);
}

.file-input {
    margin: 15px 0;
}

.file-input input[type="file"] {
    display: none;
}

.file-input label {
    cursor: pointer;
}

.modal-footer {
    padding: 20px 30px;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #d1d5db;
}

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

.btn-danger:hover {
    background: #dc2626;
}

/* Footer */
.footer {
    margin-top: 50px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.backup-btn {
    background: var(--warning);
    color: white;
}

.clear-btn {
    background: var(--danger);
    color: white;
}

.footer-links button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

/* Responsive */
@media (max-width: 1200px) {
    .form-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .guest-list {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-dropdown select, .sort-dropdown select {
        min-width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        width: 100%;
    }
    
    .footer-links button {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header, .form-card, .info-card, .guest-section {
        padding: 25px;
    }
    
    .event-stats {
        flex-direction: column;
    }
    
    .stat {
        min-width: auto;
    }
    
    .modal-content {
        margin: 10px;
    }

.featured-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}
}