/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dark-bg: #1a1a1a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

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

/* Header */
.header {
    text-align: center;
    padding: 60px 0 40px;
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.logo i {
    margin-right: 15px;
    color: #ffd700;
}

.tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Mode Selector */
.mode-selector {
    text-align: center;
    margin-bottom: 50px;
}

.mode-selector h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 600;
}

.mode-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    background: var(--card-bg);
    border: none;
    border-radius: 20px;
    padding: 30px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.mode-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mode-btn i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.mode-btn span {
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.mode-btn small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Calculation Sections */
.calculation-section {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    display: none;
}

.calculation-section.active {
    display: block;
    animation: slideInUp 0.5s ease;
}

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

/* Random Mode */
.random-controls {
    text-align: center;
}

.big-action-btn {
    background: var(--secondary-gradient);
    border: none;
    border-radius: 50px;
    padding: 25px 50px;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.big-action-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--hover-shadow);
}

.big-action-btn:active {
    transform: scale(0.98);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.big-action-btn:hover .btn-shine {
    left: 100%;
}

.big-action-btn i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.random-hint {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Manual Mode */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.styled-input, .styled-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.styled-input:focus, .styled-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.calculate-btn {
    background: var(--success-gradient);
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 100%;
    margin-top: 20px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.calculate-btn i {
    margin-right: 10px;
}

/* Results Section */
.results-section {
    display: none;
}

.results-section.show {
    display: block;
    animation: slideInUp 0.6s ease;
}

.results-card {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.coin-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.coin-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.coin-details h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.coin-details span {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.investment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profit-display {
    margin-bottom: 30px;
}

.current-value, .profit-amount {
    margin-bottom: 15px;
}

.current-value .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4facfe;
    display: block;
    margin-top: 5px;
}

.profit-amount .amount {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-top: 5px;
}

.profit-amount .amount.positive {
    color: #00f2fe;
}

.profit-amount .amount.negative {
    color: #f5576c;
}

.multiplier {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 15px 25px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 10px;
}

.multiplier.positive {
    background: var(--success-gradient);
    color: white;
}

.multiplier.negative {
    background: var(--danger-gradient);
    color: white;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn, .try-again-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.try-again-btn {
    background: var(--secondary-gradient);
    color: white;
}

.share-btn:hover, .try-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.share-btn i, .try-again-btn i {
    margin-right: 8px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Confetti Canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .mode-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn {
        min-width: 250px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .investment-details {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn, .try-again-btn {
        width: 200px;
    }
    
    .current-value .amount {
        font-size: 2rem;
    }
    
    .profit-amount .amount {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculation-section, .results-card {
        padding: 25px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .mode-selector h2 {
        font-size: 1.5rem;
    }
}

/* Animation Classes */
.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.bounce {
    animation: bounce 0.6s;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-30px,0); }
    70% { transform: translate3d(0,-15px,0); }
    90% { transform: translate3d(0,-4px,0); }
} 