/* AI Progress Tracker - Professional Styles */
.ai-progress-tracker {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    border-radius: 24px;
    margin: 30px auto;
    max-width: 1000px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

/* Hero Section */
.tracker-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
    padding: 40px 30px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff0080, #667eea, #ff0080);
    background-size: 200% 100%;
    animation: glowMove 3s ease-in-out infinite;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.ai-avatar {
    position: relative;
    flex-shrink: 0;
}

.ai-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pulse-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #667eea;
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

.hero-text h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    margin: 8px 0 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1em;
}

/* Main Container */
.tracker-container {
    padding: 30px;
}

/* Welcome State */
.welcome-state {
    text-align: center;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.card-glow {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(10px);
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

.welcome-content h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.welcome-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.ai-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1em;
    transition: all 0.3s ease;
}

.ai-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.ai-button {
    padding: 16px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 1em;
}

.ai-button.primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.ai-button.success {
    background: linear-gradient(45deg, #00b09b, #96c93d);
    color: white;
}

.ai-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-sparkle, .ai-icon {
    font-size: 1.2em;
}

.user-id-display {
    margin: 25px 0;
}

.id-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.id-badge code {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    flex: 1;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.start-btn {
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    justify-content: center;
}

/* Dashboard State */
.dashboard-state {
    animation: fadeInUp 0.6s ease-out;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #667eea;
}

.status-dot {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    border: 2px solid #1a1a2e;
}

.user-details h4 {
    margin: 0;
    color: white;
    font-size: 1.4em;
}

.user-id {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    display: block;
    margin: 4px 0;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

.status-pulse {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.streak-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.streak-fire {
    font-size: 2em;
    animation: flame 1.5s ease-in-out infinite;
}

.streak-info {
    text-align: center;
}

.streak-count {
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.streak-info span:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

/* Progress Grid */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.stat-content {
    margin-bottom: 15px;
}

.stat-value {
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    display: block;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-content span:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

.stat-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Progress Visualization */
.progress-viz {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.viz-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.viz-card h5 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.progress-circle {
    position: relative;
    display: inline-block;
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.circle-text span {
    color: white;
    font-size: 1.5em;
    font-weight: 700;
}

/* AI Activities Feed */
.ai-feed {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feed-header h5 {
    color: white;
    margin: 0;
    font-size: 1.2em;
}

.feed-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 0, 128, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    color: #ff0080;
    font-size: 0.8em;
    font-weight: 600;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #ff0080;
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

.activities-feed {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 1.3em;
    flex-shrink: 0;
    margin-top: 2px;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    color: white;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.activity-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8em;
}

/* Save Indicator */
.save-indicator {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.indicator-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

.save-icon {
    font-size: 1.2em;
}

.save-time {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.5);
}

/* Leaderboard Section */
.leaderboard-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
}

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

.section-header h4 {
    color: white;
    margin: 0;
    font-size: 1.3em;
}

.trophy-animation {
    font-size: 1.5em;
    animation: bounce 2s ease-in-out infinite;
}

.leaderboard-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.rank-badge {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.9em;
    flex-shrink: 0;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.player-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.player-details {
    display: flex;
    flex-direction: column;
}

.player-name {
    color: white;
    font-weight: 600;
    margin-bottom: 2px;
}

.player-stats {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
}

/* AI Footer */
.ai-footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.quote-icon {
    font-size: 1.2em;
}

.footer-signature {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
}

.signature {
    color: #667eea;
    font-weight: 600;
    margin-left: 5px;
}

/* Animations */
@keyframes glowMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

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

@keyframes flame {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-progress-tracker {
        margin: 15px;
        border-radius: 16px;
    }
    
    .tracker-container {
        padding: 20px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .user-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .progress-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-viz {
        grid-template-columns: 1fr;
    }
    
    .id-badge {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
