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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a1628 50%, #1a3a6e 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

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

header {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    margin-bottom: 30px;
    border: 2px solid #2563eb;
}

.logo h1 {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

header h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    color: #a1a1a1;
    font-size: 18px;
}

.instructions {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #1e40af;
}

.instructions h3 {
    color: #60a5fa;
    margin-bottom: 20px;
    font-size: 24px;
}

.instructions ol {
    list-style-position: inside;
    font-size: 18px;
    line-height: 2;
}

.instructions strong {
    color: #2563eb;
}

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

.cape-card {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    padding: 25px;
    border: 2px solid #2563eb;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.cape-name {
    font-size: 24px;
    font-weight: bold;
    color: #60a5fa;
}

.cape-tier {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.tier-legendary { background: linear-gradient(90deg, #1a3a6e, #2563eb); }
.tier-epic { background: linear-gradient(90deg, #1e40af, #3b82f6); }
.tier-rare { background: linear-gradient(90deg, #2563eb, #60a5fa); }

.code-display {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #2563eb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    position: relative;
}

.code-text {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #ffffff;
    user-select: all;
}

.copy-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
    width: 100%;
    margin-top: 10px;
}

.copy-btn:hover {
    background: #1e40af;
}

.copy-btn:active {
    background: #1a3a6e;
}

.copy-btn.copied {
    background: #10b981;
}

.usage-bar {
    margin-top: 15px;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #a1a1a1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transition: width 0.3s;
}

.stats-section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #1e40af;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #2563eb;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #60a5fa;
    margin-bottom: 5px;
}

.stat-label {
    color: #a1a1a1;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: rgba(220, 38, 38, 0.2);
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #fca5a5;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: #a1a1a1;
}

footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    color: #2563eb;
}

.small {
    font-size: 14px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 36px;
    }
    
    header h2 {
        font-size: 24px;
    }
    
    .codes-section {
        grid-template-columns: 1fr;
    }
    
    .code-text {
        font-size: 16px;
    }
}
