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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 24px;
    color: white;
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Canvas Container */
.canvas-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    background: white;
    touch-action: none;
}

/* Drawing Hint */
.drawing-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.hint-content {
    background: rgba(255,255,255,0.95);
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
}

.hint-icon {
    font-size: 1.2rem;
}

.hint-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.drawing-hint.fade-out {
    opacity: 0;
}

/* Score Container */
.score-container {
    width: 100%;
    max-width: 400px;
}

.score-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.score-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.score-bar-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.score-bar {
    flex: 1;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0%;
    position: relative;
}

.score-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.score-percentage {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    min-width: 50px;
}

.score-message {
    margin: 16px 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Mini App Actions */
.mini-app-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.reset-btn, .share-btn, .challenge-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    min-height: 56px;
    min-width: 140px;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.challenge-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.reset-btn:hover, .share-btn:hover, .challenge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.share-btn:hover {
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.6);
}

.challenge-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.reset-btn:active, .share-btn:active, .challenge-btn:active {
    transform: translateY(0);
}

.btn-text {
    font-size: 1rem;
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255,255,255,0.8);
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes celebration {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.celebration {
    animation: celebration 0.6s ease-in-out;
}

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

.score-card {
    animation: slideIn 0.5s ease-out;
}

/* Perfect circle guide styling */
.guide-circle {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Desktop Styles */
@media (min-width: 768px) {
    .app {
        padding: 24px;
    }
    
    .title {
        font-size: 3.5rem;
        margin-bottom: 12px;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .main {
        flex-direction: row;
        gap: 40px;
        align-items: flex-start;
        max-width: 1000px;
    }
    
    .canvas-container {
        max-width: 500px;
    }
    
    .score-container {
        width: 350px;
        position: sticky;
        top: 24px;
    }
    
    .score-card {
        padding: 32px;
    }
    
    .score-title {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }
    
    .score-bar-container {
        margin: 24px 0;
    }
    
    .score-message {
        margin: 20px 0;
        font-size: 1rem;
    }
    
    .mini-app-actions {
        flex-direction: row;
        gap: 12px;
    }
}

@media (min-width: 1200px) {
    .canvas-container {
        max-width: 600px;
    }
    
    .score-container {
        width: 400px;
    }
}

/* Large Mobile */
@media (min-width: 480px) and (max-width: 767px) {
    .title {
        font-size: 2.8rem;
    }
    
    .canvas-container {
        max-width: 450px;
    }
    
    .score-card {
        padding: 28px;
    }
}

/* Small Mobile */
@media (max-width: 479px) {
    .app {
        padding: 12px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .canvas-container {
        border-radius: 20px;
    }
    
    .score-card {
        padding: 20px;
        border-radius: 20px;
    }
    
    .score-title {
        font-size: 1.2rem;
    }
    
    .hint-text {
        font-size: 0.9rem;
    }
    
    .reset-btn, .share-btn, .challenge-btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
    
    .btn-text {
        font-size: 0.95rem;
    }
} 