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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    color: #ffffff;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #f7931e, #ffeb3b, #4caf50, #2196f3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(90deg); }
}

.header p {
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 300;
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: #f7931e;
    box-shadow: 0 0 0 3px rgba(247, 147, 30, 0.2);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.refresh-btn {
    padding: 15px 25px;
    background: linear-gradient(45deg, #f7931e, #ffb347);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 147, 30, 0.4);
}

.refresh-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.refresh-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.refresh-btn.loading .refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.last-updated {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.crypto-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crypto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, #f7931e, #ffeb3b, #4caf50, #2196f3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.crypto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.crypto-card:hover::before {
    transform: scaleX(1);
}

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

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

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.crypto-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.crypto-symbol {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.crypto-rank {
    background: rgba(247, 147, 30, 0.2);
    color: #f7931e;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.crypto-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.crypto-changes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.change-item {
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.change-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.change-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.positive {
    color: #4caf50;
}

.negative {
    color: #f44336;
}

.neutral {
    color: rgba(255, 255, 255, 0.8);
}

.loading-grid {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #f7931e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #f44336;
    display: none;
    margin: 20px 0;
}

.error.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.market-cap {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .crypto-grid {
        grid-template-columns: 1fr;
    }
    
    .crypto-card {
        padding: 20px;
    }
}