/* Gaming-Inspired Form Styles for Metamaster */

.form-container {
    background-color: #fff;
    border-radius: 0.375rem;
    padding: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545, #6f42c1);
    z-index: 1;
}

.tournament-form {
    position: relative;
    z-index: 2;
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.section-header i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.section-header h3 {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--gaming-text-primary, #495057);
    letter-spacing: 0.5px;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    margin-left: 1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.form-label.required::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #fff;
}

.form-control:hover {
    border-color: #adb5bd;
}

/* Textarea specific */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Select specific */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

/* Reset any custom checkbox styling - use Bootstrap defaults */

/* Help Text */
.form-help {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.4;
    display: block;
    width: 100%;
    padding: 0.5rem 0;
}

.form-help:hover {
    color: #6c757d;
    background: none;
    border: none;
    transform: none;
    box-shadow: none;
    cursor: default;
}

/* Submit Section */
.submit-section {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    border: 2px dashed #dee2e6;
    transition: border-color 0.15s ease-in-out;
    margin-top: 2rem;
}

.submit-section:hover {
    border-color: #007bff;
}

.btn-create {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #0056b3, #004494);
}

.btn-create:active {
    transform: translateY(0);
}

.btn-cancel {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.btn-cancel:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .section-line {
        width: 100%;
        margin: 0.5rem 0 0 0;
    }
    
    .submit-section {
        padding: 1.5rem;
    }
    
    .btn-create, .btn-cancel {
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* Responsive Design Enhancements */

/* Loading State */
.form-loading .form-control {
    opacity: 0.6;
    pointer-events: none;
}

.form-loading .btn-create {
    opacity: 0.8;
    cursor: not-allowed;
}