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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f3f2f1;
    color: #323130;
}

.outlook-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #ffffff;
}

/* Header */
.outlook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #edebe9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #0078d4;
}

.logo i {
    font-size: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #605e5c;
}

.header-center {
    flex: 1;
    text-align: center;
}

.current-date {
    font-size: 16px;
    font-weight: 600;
    color: #323130;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.persistent-score {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #f3f2f1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #0078d4;
    border: 1px solid #edebe9;
}

.persistent-score i {
    color: #ffd700;
    font-size: 16px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.5s ease-out;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    animation: slideUp 0.5s ease-out;
}

.loading-icon {
    font-size: 48px;
    color: #0078d4;
    margin-bottom: 20px;
}

.loading-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 16px;
}

.loading-content p {
    font-size: 16px;
    color: #605e5c;
    margin-bottom: 8px;
    line-height: 1.5;
}

.loading-content p strong {
    color: #0078d4;
    font-weight: 700;
}

.loading-subtitle {
    font-size: 14px !important;
    color: #a19f9d !important;
    font-style: italic;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #faf9f8;
    border-right: 1px solid #edebe9;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.calendar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-btn {
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: #605e5c;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #edebe9;
}

.nav-btn.active {
    background-color: #0078d4;
    color: white;
}

/* Mini Calendar */
.mini-calendar {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mini-nav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #605e5c;
}

.mini-nav:hover {
    background-color: #edebe9;
}

#mini-month {
    font-size: 14px;
    font-weight: 600;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    color: #605e5c;
}

.mini-day:hover {
    background-color: #edebe9;
}

.mini-day.today {
    background-color: #0078d4;
    color: white;
}

.mini-day.other-month {
    color: #a19f9d;
}

.mini-day.has-events {
    font-weight: 600;
    color: #0078d4;
}

/* Calendars List */
.calendars-list h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #323130;
}

.calendar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-item input[type="checkbox"] {
    accent-color: #0078d4;
}

.calendar-item label {
    font-size: 14px;
    color: #605e5c;
    cursor: pointer;
}

/* Calendar View */
.calendar-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #edebe9;
}

/* Game Status */
.game-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 24px;
    background-color: #0078d4;
    color: white;
    border-bottom: 1px solid #106ebe;
    font-size: 12px;
    font-weight: 600;
}

.game-info {
    display: flex;
    gap: 20px;
}

.game-buttons {
    display: flex;
    gap: 8px;
}

.game-buttons .btn-primary {
    background-color: #ffffff;
    color: #0078d4;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.game-buttons .btn-primary:hover {
    background-color: #f3f2f1;
}

.game-buttons .btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background-color 0.2s;
}

.game-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-buttons {
    display: flex;
    gap: 8px;
}

.current-week {
    font-size: 16px;
    font-weight: 600;
    color: #323130;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

/* Weekly Calendar Grid */
.calendar-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.week-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background-color: #faf9f8;
    border-bottom: 1px solid #edebe9;
}

.time-header {
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #605e5c;
    text-align: center;
    border-right: 1px solid #edebe9;
}

.day-header {
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #323130;
    text-align: center;
    border-right: 1px solid #edebe9;
}

.day-header.today {
    background-color: #0078d4;
    color: white;
}

.week-body {
    flex: 1;
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    overflow: auto;
    position: relative;
}

.time-slot {
    padding: 8px;
    font-size: 12px;
    color: #605e5c;
    text-align: center;
    border-right: 1px solid #edebe9;
    border-bottom: 1px solid #edebe9;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-slot {
    position: relative;
    border-right: 1px solid #edebe9;
    border-bottom: 1px solid #edebe9;
    min-height: 60px;
    padding: 4px;
}

.day-slot.today {
    background-color: #f0f8ff;
}

/* Events */
.event {
    background-color: #0078d4;
    color: white;
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-color 0.2s;
    position: relative;
    z-index: 10;
}

.event:hover {
    background-color: #106ebe;
}

.event.urgent {
    background-color: #d13438;
}

.event.optional {
    background-color: #107c10;
}

.event.breakout-trigger {
    background-color: #ff8c00;
    animation: pulse 2s infinite;
}

.event.hit {
    animation: hitEffect 0.3s ease-out;
    opacity: 0;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes hitEffect {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% { 
        transform: scale(0);
        opacity: 0;
    }
}

/* Game Elements */
.game-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
}

.paddle {
    position: absolute;
    width: 100px;
    height: 10px;
    background-color: #0078d4;
    border-radius: 5px;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.ball {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    border-radius: 50%;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn-primary {
    background-color: #0078d4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #106ebe;
}

.btn-secondary {
    background-color: #ffffff;
    color: #323130;
    border: 1px solid #edebe9;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #f3f2f1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #edebe9;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #323130;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #605e5c;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #323130;
}

.modal-body {
    padding: 24px;
}

.event-details p {
    margin-bottom: 12px;
    line-height: 1.5;
}

.event-details ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.event-details li {
    margin-bottom: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .calendar-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .toolbar-actions {
        justify-content: center;
    }
    
    .game-status {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .game-info {
        justify-content: center;
    }
    
    .week-header {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .week-body {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .time-slot {
        font-size: 10px;
        padding: 4px;
    }
    
    .event {
        font-size: 10px;
        padding: 2px 4px;
    }
}

@media (max-width: 480px) {
    .outlook-header {
        padding: 8px 16px;
    }
    
    .header-left {
        gap: 12px;
    }
    
    .logo span {
        display: none;
    }
    
    .sidebar {
        width: 150px;
        padding: 12px;
    }
    
    .week-header {
        grid-template-columns: 40px repeat(7, 1fr);
    }
    
    .week-body {
        grid-template-columns: 40px repeat(7, 1fr);
    }
    
    .time-slot {
        font-size: 8px;
        padding: 2px;
    }
}
