:root {
    --primary-color: #ff4655;
    --secondary-color: #00d4ff;
    --background-dark: #0f1419;
    --background-mid: #1a252f;
    --background-light: #2a3441;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.2);
    --border-active: rgba(255, 70, 85, 0.3);
    --shadow-primary: rgba(255, 70, 85, 0.3);
    --shadow-secondary: rgba(0, 212, 255, 0.2);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-mid) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    background: #ff6b85;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.3rem;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), #ff6b75);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Total Cost Section */
.total-cost {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 70, 85, 0.1);
    border-radius: 15px;
    border: 2px solid var(--border-active);
}

.total-cost h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Currency Toggle */
.currency-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.currency-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    font-size: 0.9rem;
}

.currency-btn:hover {
    background: rgba(255, 70, 85, 0.1);
    transform: translateY(-2px);
}

.currency-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

/* Weapons Grid */
.weapons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.weapon-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.weapon-category:hover {
    border-color: var(--border-active);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.weapon-category h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Weapon Grid */
.weapon-grid {
    display: grid;
    gap: 15px;
}

.weapon-slot {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.weapon-slot:hover {
    border-color: var(--primary-color);
    background: rgba(255, 70, 85, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-primary);
}

.weapon-slot.selected {
    border-color: var(--secondary-color);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 8px 25px var(--shadow-secondary);
}

/* Weapon Text */
.weapon-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weapon-slot.selected .weapon-name {
    color: var(--secondary-color);
}

.skin-name {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-top: 5px;
    font-weight: 500;
}

.skin-price {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, var(--background-mid) 0%, var(--background-light) 100%);
    padding: 30px;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid var(--border-active);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-active);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 70, 85, 0.1);
    transform: scale(1.1);
}

/* Skins Grid */
.skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.skin-option {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.skin-option::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;
}

.skin-option:hover::before {
    left: 100%;
}

.skin-option:hover {
    border-color: var(--secondary-color);
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-secondary);
}

.skin-option.selected {
    border-color: var(--primary-color);
    background: rgba(255, 70, 85, 0.1);
    box-shadow: 0 8px 25px var(--shadow-primary);
}

.skin-option.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Skin Option Content */
.skin-option-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1rem;
}

.skin-option-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.2);
}

.disclaimer {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 8px;
}

.github-link:hover {
    color: var(--primary-color);
    background: rgba(255, 70, 85, 0.1);
    transform: translateY(-2px);
}

.github-icon {
    width: 24px;
    height: 24px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .weapons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .weapons-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .total-cost h2 {
        font-size: 1.5rem;
    }
    
    .skins-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Weapon slot image styles */
.weapon-image-container {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.weapon-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.weapon-slot:hover .weapon-image {
    transform: scale(1.05);
}

.weapon-slot.selected .weapon-image-container {
    background: rgba(255, 70, 85, 0.1);
    border: 2px solid var(--primary-color);
}

/* Skin modal image styles */
.skin-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
}

.skin-image-container {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.skin-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.skin-option:hover .skin-image {
    transform: scale(1.1);
}

.skin-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 70, 85, 0.5);
    transform: translateY(-2px);
}

.skin-option.selected {
    background: rgba(255, 70, 85, 0.15);
    border-color: var(--primary-color);
}

.skin-option.selected .skin-image-container {
    border: 1px solid var(--primary-color);
}

.skin-info {
    text-align: center;
    width: 100%;
}

.skin-option-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #ffffff;
}

.skin-option-price {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 4px;
}

.skin-option-collection {
    font-size: 12px;
    color: #888;
    margin-bottom: 2px;
}

.skin-option-category {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading states for images */
.weapon-image-container.loading,
.skin-image-container.loading {
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.weapon-image-container.loading::after,
.skin-image-container.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

    /* Remove skin button styles */
    .remove-skin-btn {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 20px;
        height: 20px;
        background: var(--primary-color);
        border: none;
        border-radius: 50%;
        color: white;
        cursor: pointer;
        font-size: 14px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        transition: var(--transition);
        box-shadow: 0 2px 8px var(--shadow-primary);
        z-index: 10;
    }

    .remove-skin-btn:hover {
        background: #ff6b75;
        transform: scale(1.1);
        box-shadow: 0 4px 15px var(--shadow-primary);
    }

    .remove-skin-btn:active {
        transform: scale(0.95);
    }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .weapon-image-container {
        height: 60px;
    }
    
    .skin-image-container {
        height: 80px;
    }
    
    .skin-option {
        min-height: 180px;
        padding: 12px;
    }
}

/* Reset All Button */
.header-content {
    position: relative;
}

.reset-all-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(255, 70, 85, 0.2);
}

.reset-all-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-30px) scale(1.05);
    box-shadow: 0 6px 20px var(--shadow-primary);
}

.reset-all-btn:active {
    transform: translateY(-50%) scale(0.98);
}

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

.reset-all-btn:hover .reset-icon {
    transform: rotate(180deg);
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .reset-all-btn {
        position: static;
        transform: none;
        margin-top: 10px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .reset-all-btn:hover {
        transform: scale(1.02);
    }
    
    .reset-all-btn:active {
        transform: scale(0.98);
    }
    
    .header-content {
        flex-direction: column;
    }
}