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

body {
    font-family: 'Comfortaa', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.logo {
    font-size: 64px;
    margin-bottom: 10px;
}

h1 {
    color: #667eea;
    font-size: 42px;
    margin-bottom: 10px;
}

.tagline {
    color: #666;
    font-size: 16px;
}

/* User Menu */
.user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-diamonds {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-cabinet {
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-cabinet:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Auth */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Comfortaa', cursive;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.info {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Diamond Counter */
.diamond-counter {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    padding: 15px 25px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.diamond-icon {
    font-size: 32px;
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
}

.form-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.form-section input[type="text"],
.form-section select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Comfortaa', cursive;
}

.form-section input:focus,
.form-section select:focus {
    outline: none;
    border-color: #667eea;
}

/* World Grid */
.world-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.world-item {
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.world-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.world-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea15, #764ba215);
}

.world-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.world-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Moral Grid */
.moral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.moral-item {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.moral-item:hover {
    border-color: #764ba2;
}

.moral-item.selected {
    border-color: #764ba2;
    background: linear-gradient(135deg, #764ba215, #667eea15);
}

.moral-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.moral-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Duration Selector */
.duration-selector {
    display: flex;
    gap: 15px;
}

.duration-selector label {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.duration-selector input[type="radio"] {
    margin-right: 8px;
}

.duration-selector label:has(input:checked) {
    border-color: #667eea;
    background: #667eea15;
}

/* Cost Display */
.cost-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0;
}

.cost-display span {
    color: #667eea;
    font-size: 28px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Comfortaa', cursive;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ffffff30;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .world-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .duration-selector {
        flex-direction: column;
    }
}
