* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
    min-height: 100vh;
}

.navbar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.1);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-button {
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.15);
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: rgba(217, 119, 6, 0.2);
    border-color: rgba(217, 119, 6, 0.5);
    color: #f1f5f9;
}

.nav-button.active {
    background: rgba(217, 119, 6, 0.3);
    border-color: rgba(217, 119, 6, 0.5);
    color: #fcd34d;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    margin-bottom: 40px;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(217, 119, 6, 0.15) 0%, transparent 50%);
    border-radius: 20px;
    filter: blur(30px);
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.3);
    flex-shrink: 0;
    padding: 6px;
    overflow: hidden;
}

.header-main-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.header-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.header-title-row h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    background: rgba(217, 119, 6, 0.3);
    border: 1px solid rgba(217, 119, 6, 0.5);
    color: #fcd34d;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.header-subtitle {
    color: #94a3b8;
    font-size: 14px;
}

.top-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card:hover {
    border-color: rgba(203, 213, 225, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.card-icon {
    font-size: 24px;
}

.card-purchase {
    border-top: 3px solid #d97706;
}

.card-profit {
    border-top: 3px solid #10b981;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="number"],
select,
.role-select {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.15);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 14px;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select,
.role-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

input[type="number"]:focus,
select:focus,
.role-select:focus {
    outline: none;
    border-color: rgba(217, 119, 6, 0.5);
    background-color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fbbf24' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

option {
    background: #1e293b;
    color: #f1f5f9;
    padding: 8px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.equipment-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(203, 213, 225, 0.15);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.equipment-card:hover {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
}

.equipment-card.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
}

.equipment-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.equipment-info {
    flex: 1;
}

.equipment-name {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.equipment-bonus {
    font-size: 10px;
    color: #94a3b8;
}

.equipment-card.active .equipment-bonus {
    color: #10b981;
}

.role-icon-preview {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(203, 213, 225, 0.1);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}

.role-preview-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.profit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.profit-box {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(203, 213, 225, 0.1);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.profit-box:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(203, 213, 225, 0.2);
}

.profit-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profit-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profit-icon {
    font-size: 18px;
}

.profit-value {
    font-size: 22px;
    font-weight: 700;
}

.profit-value.cost {
    color: #60a5fa;
}

.profit-value.revenue {
    color: #10b981;
}

.profit-unit {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
}

.info-box {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(203, 213, 225, 0.1);
    border-radius: 8px;
    padding: 16px;
}

.info-box-title {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-box-text {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.6;
}

.resale-section {
    margin-bottom: 32px;
}

.resale-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
}

.resale-icon {
    font-size: 28px;
}

.resale-subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 24px;
}

.table-wrapper {
    overflow-x: auto;
}

.role-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.role-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid rgba(203, 213, 225, 0.2);
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.role-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.1);
}

.role-table tbody tr {
    transition: all 0.2s ease;
}

.role-table tbody tr:hover {
    background: rgba(15, 23, 42, 0.4);
}

.level-cell {
    font-weight: 600;
    color: #fbbf24;
}

.points-cell {
    color: #f1f5f9;
}

.bonus-cell {
    color: #10b981;
    font-weight: 600;
}

.required-cell {
    color: #cbd5e1;
}

.rewards-cell {
    color: #94a3b8;
    font-size: 12px;
    max-width: 300px;
}

.quests-cell,
.days-cell {
    font-weight: 600;
    text-align: center;
}

.quests-cell {
    color: #10b981;
}

.days-cell {
    color: #60a5fa;
}

.watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
    pointer-events: none;
    z-index: 50;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(217, 119, 6, 0.2);
    animation: watermarkGlow 3s ease-in-out infinite;
}

@keyframes watermarkGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(217, 119, 6, 0.2);
        border-color: rgba(217, 119, 6, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(217, 119, 6, 0.4);
        border-color: rgba(217, 119, 6, 0.6);
    }
}

@media (max-width: 1024px) {
    .top-section {
        grid-template-columns: 1fr;
    }

    .profit-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .header-title-row h1 {
        font-size: 24px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .profit-grid {
        grid-template-columns: 1fr;
    }

    .equipment-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .watermark {
        font-size: 11px;
        padding: 8px 12px;
        bottom: 10px;
        right: 10px;
    }
}