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

:root {
    --bg-primary: #313338;
    --bg-secondary: #2b2d31;
    --bg-tertiary: #1e1f22;
    --bg-floating: #111214;
    --bg-modifier: rgba(0, 0, 0, 0.25);
    
    --brand-primary: #5865f2;
    --brand-hover: #4752c4;
    --brand-active: #3c45a5;
    
    --success: #248046;
    --success-hover: #1a6334;
    --danger: #da373c;
    --danger-hover: #a12828;
    
    --text-primary: #f2f3f5;
    --text-secondary: #b5bac1;
    --text-muted: #80848e;
    --text-link: #00a8fc;
    
    --input-bg: #1e1f22;
    --input-border: #1e1f22;
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1:focus {
    outline: none;
}

/* Layout */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hero-content {
    width: 100%;
    max-width: 480px;
}

/* Card */
.glass-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 32px;
    box-shadow: var(--shadow);
}

/* Profile Section */
.profile-section {
    margin-bottom: 24px;
}

.profile-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    min-height: 32px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select {
    width: 100%;
    height: 40px;
    padding: 10px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 3px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.form-input:hover,
.form-select:hover {
    border-color: var(--bg-floating);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--brand-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
}

/* Buttons */
.btn {
    height: 40px;
    min-width: 96px;
    padding: 2px 16px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.17s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-hover);
}

.btn-primary:active {
    background: var(--brand-active);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-floating);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-warning {
    background: #f0b232;
    color: #2b2d31;
}

.btn-warning:hover {
    background: #d99f28;
}

/* Session Section */
.session-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.session-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.session-input-group .form-input {
    flex: 1;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 8px;
}

.btn-group .btn {
    flex: 1;
}

/* Peers Container */
.peers-container {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    min-height: 80px;
}

/* Validation Styles */
.valid.modified:not([type=checkbox]) {
    border-color: var(--success);
}

.invalid {
    border-color: var(--danger);
}

.validation-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
}

/* Error Boundary */
.blazor-error-boundary {
    background: var(--danger);
    padding: 16px;
    color: white;
    border-radius: 4px;
    margin: 16px;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: var(--input-border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-card {
        padding: 24px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .session-input-group {
        flex-direction: column;
    }
}
