/* Create Game Specific Styles */
.container {
    padding: 2rem 1rem 4rem 1rem;
    min-height: calc(100vh + 200px); /* Force content to be taller than viewport */
    background-color: #001e48;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.container header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.container header h1 {
    color: #eb7317;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0 #001e48;
}

.container header p {
    color: #faeac3;
    font-size: 1.1rem;
}

.game-config-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    min-height: 24px; /* Ensure consistent height for alignment */
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.info-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.info-btn:hover {
    background: #2563eb;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
    position: relative;
}

.toggle-label::before {
    content: '';
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    background-color: #ccc;
    border-radius: 25px;
    transition: 0.3s;
    flex-shrink: 0;
}

.toggle-label::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 21px;
    height: 21px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-label::before {
    background-color: #3b82f6;
}

.toggle-switch input:checked + .toggle-label::after {
    transform: translateY(-50%) translateX(25px);
}

.toggle-text {
    font-weight: 500;
    color: #374151;
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
}

.checkbox-label:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    color: #3b82f6;
}

.checkbox-label.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Card Pack Styles */
.checkbox-label.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-label.locked input[type="checkbox"] {
    cursor: not-allowed;
}

.pack-status {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.pack-status.included {
    background-color: #d1fae5;
    color: #047857;
}

.pack-status.locked {
    background-color: #fee2e2;
    color: #dc2626;
}

.pack-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #eb7317;
}

.pack-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.store-link {
    color: #eb7317;
    text-decoration: none;
    font-weight: bold;
}

.store-link:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    color: #059669;
    margin-bottom: 1.5rem;
}

.game-code-display {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
}

.game-code-display label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.game-code {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #1f2937;
    margin: 0.5rem 0;
    letter-spacing: 2px;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Tooltip Styles */
.tooltip {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 350px;
    min-width: 200px;
    border: 1px solid #e5e7eb;
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    transform-origin: center;
}

.tooltip-content {
    position: relative;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #374151;
}

.tooltip-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
}

.tooltip-close:hover {
    color: #374151;
}

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

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Subscription Warning Styles */
.subscription-warning {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #7f1d1d;
}

.warning-content h3 {
    margin: 0 0 0.5rem 0;
    color: #dc2626;
    font-family: 'Luckiest Guy', Arial Black, Arial, sans-serif;
}

.warning-content p {
    margin: 0 0 1rem 0;
    color: #7f1d1d;
}

.warning-actions {
    display: flex;
    gap: 1rem;
}

.btn-upgrade {
    background: linear-gradient(135deg, #eb7317, #f59e0b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.btn-upgrade:hover {
    transform: translateY(-1px);
}

.btn-dismiss {
    background: transparent;
    border: 2px solid #dc2626;
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-dismiss:hover {
    background: #dc2626;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .game-config-form {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .checkbox-group {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .container header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .game-config-form {
        margin: 0;
        border-radius: 8px;
    }
    
    .container header h1 {
        font-size: 1.75rem;
    }
    
    .form-group label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-btn {
        align-self: flex-start;
    }
}

/* Validation Styles */
.form-group.error input,
.form-group.error select {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Body override for create game page */
html {
    height: auto;
    overflow: visible;
}

body {
    height: auto !important;
    overflow: visible !important;
    overflow-y: auto !important;
}
