@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

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

/* Cosmic theme with beautiful gradient */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b69 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    position: relative;
}

/* Twinkling star background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Beautiful shooting stars */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, #a88bff);
    border-radius: 50%;
    animation: shoot 4s linear infinite;
}

@keyframes shoot {
    0% {
        opacity: 0;
        transform: translateX(-100px) translateY(100px);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(300px) translateY(-300px);
    }
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(168, 139, 255, 0.4);
    z-index: 100;
    padding: 20px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar.collapsed .menu-item span:not(:first-child) {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 15px;
}

.sidebar.collapsed h3 {
    display: none;
}

.sidebar-toggle {
    position: absolute;
    right: -40px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: rgba(168, 139, 255, 0.3);
    border: 1px solid rgba(168, 139, 255, 0.4);
    border-radius: 0 10px 10px 0;
    border-left: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a88bff;
    font-size: 1.2rem;
}

.sidebar h3 {
    font-family: 'Orbitron', monospace;
    color: #a88bff;
    margin-bottom: 20px;
    text-align: center;
}

/* Navigation items */
.menu-item {
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item:hover {
    background: rgba(168, 139, 255, 0.2);
    transform: translateX(5px);
}

.menu-item.active {
    background: rgba(168, 139, 255, 0.25);
    border: 1px solid rgba(168, 139, 255, 0.5);
}

/* Main content area */
.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content.expanded {
    margin-left: 40px;
}

/* Countdown timer */
.timer-section {
    text-align: center;
    padding: 30px 20px;
    position: relative;
}

.timer {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: #ffb86c;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 184, 108, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(255, 184, 108, 0.4));
    }
    to {
        filter: drop-shadow(0 0 40px rgba(255, 184, 108, 0.7));
    }
}

.timer-label {
    font-size: 2rem;
    color: #a88bff;
    opacity: 0.9;
    font-weight: bold;
}

/* Central rocket area */
.center-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.rocket-container {
    text-align: center;
    position: relative;
}

/* Main rocket */
.main-rocket {
    font-size: 25rem;
    display: inline-block;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(168, 139, 255, 0.5));
    cursor: pointer;
    transition: all 0.3s ease;
    color: #a88bff;
}

.main-rocket:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 50px rgba(168, 139, 255, 0.8));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Fuel gauge */
.fuel-info {
    margin-top: 30px;
}

.fuel-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #a88bff;
    font-weight: bold;
}

.fuel-bar-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    padding: 5px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Fuel bar */
.fuel-bar {
    height: 25px;
    background: linear-gradient(90deg, #ff6b9d, #ffb86c, #68d8a0, #a88bff);
    border-radius: 50px;
    transition: width 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.fuel-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* User profile */
.user-profile {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #a88bff, #68c9ff);
    padding: 3px;
    cursor: pointer;
    z-index: 200;
    transition: all 0.3s ease;
}

.user-profile:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(168, 139, 255, 0.6);
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="50" fill="%23ff9b39"/><circle cx="50" cy="35" r="15" fill="white"/><ellipse cx="50" cy="75" rx="20" ry="15" fill="white"/></svg>') center/cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Modal windows */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(26, 26, 62, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 139, 255, 0.4);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #ff6b9d;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 157, 0.2);
}

.modal h2 {
    font-family: 'Orbitron', monospace;
    color: #a88bff;
    margin-bottom: 20px;
    text-align: center;
}

/* Crew member grid */
.crew-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.crew-member {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 139, 255, 0.2);
}

.crew-member:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 139, 255, 0.5);
    box-shadow: 0 10px 30px rgba(168, 139, 255, 0.3);
}

.crew-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background-size: cover;
    background-position: center;
    border: 2px solid #a88bff;
}

.crew-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.crew-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Status indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-done {
    background: #68d8a0;
    box-shadow: 0 0 10px rgba(104, 216, 160, 0.5);
}

.status-pending {
    background: #ffb86c;
    animation: pulse 1.5s infinite;
}

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

.status-missed {
    background: #ff6b9d;
}

.score {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
}

.score.positive {
    color: #68d8a0;
}

.score.negative {
    color: #ff6b9d;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    justify-content: center;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn-study {
    background: linear-gradient(45deg, #68d8a0, #a88bff);
    color: white;
}

.btn-study:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(104, 216, 160, 0.4);
}

.btn-no-study {
    background: linear-gradient(45deg, #ff6b9d, #ffb86c);
    color: white;
}

.btn-no-study:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 157, 0.4);
}

/* Profile statistics dashboard */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    text-align: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #a88bff;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Activity history timeline */
.activity-history {
    margin-top: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.activity-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .timer {
        font-size: 2rem;
    }

    .main-rocket {
        font-size: 8rem;
    }

    .user-profile {
        width: 60px;
        height: 60px;
        top: 20px;
        right: 20px;
    }

    .fuel-bar-container {
        width: 250px;
    }
}

/* Smooth fade-in animations */
.fade-in {
    animation: fadeIn 1s ease-out;
}

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

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background-size: cover;
    background-position: center;
    border: 3px solid #a88bff;
}

.admin-badge {
    background: #ffb86c;
    color: #0f0f23;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 10px auto;
    background-size: cover;
    background-position: center;
    border: 2px solid #a88bff;
}

.upload-btn {
    display: inline-block;
    padding: 8px 15px;
    background: rgba(168, 139, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: rgba(168, 139, 255, 0.5);
}

.team-summary {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #a0a0c0;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
}

.crew-results {
    margin-top: 20px;
}

.results-header {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr;
    padding: 10px 15px;
    background: rgba(168, 139, 255, 0.1);
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 10px;
}

.crew-results-list {
    max-height: 400px;
    overflow-y: auto;
}

.crew-result-row {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.3s ease;
}

.crew-result-row:hover {
    background: rgba(168, 139, 255, 0.1);
}

.crew-avatar-small {
    font-size: 1.5rem;
    margin-right: 10px;
    display: inline-block;
}

.crew-name {
    display: inline-block;
    vertical-align: middle;
}

.crew-stats {
    display: flex;
    gap: 10px;
}

.stat-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.study-days {
    background: rgba(104, 216, 160, 0.15);
    color: #68d8a0;
}

.missed-days {
    background: rgba(255, 107, 157, 0.15);
    color: #ff6b9d;
}

.positive {
    color: #68d8a0;
    font-weight: bold;
    font-size: 1.1rem;
}

.negative {
    color: #ff6b9d;
    font-weight: bold;
    font-size: 1.1rem;
}

h3{
    padding: 10px;
    text-align: center;
}