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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    color: #e5e5e5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    padding: 20px 0;
}

.hidden {
    display: none !important;
}

/* Auth Section */
#auth-section {
    text-align: center;
    padding-top: 80px;
}

#auth-section h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
}

.tabs {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.tab {
    background: transparent;
    border: none;
    color: #555;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 0;
    letter-spacing: 0.05em;
}

.tab.active {
    color: #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 280px;
    margin: 0 auto;
}

.form input {
    padding: 14px;
    border: 1px solid #222;
    border-radius: 4px;
    background: #0a0a0a;
    color: #e5e5e5;
    font-size: 0.9rem;
}

.form input::placeholder {
    color: #555;
}

.form input:focus {
    outline: none;
    border-color: #444;
}

/* Fix autofill styling */
.form input:-webkit-autofill,
.form input:-webkit-autofill:hover,
.form input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #0a0a0a inset;
    -webkit-text-fill-color: #e5e5e5;
    border: 1px solid #222;
    caret-color: #e5e5e5;
}

.form button[type="submit"] {
    padding: 14px;
    border: 1px solid #333;
    border-radius: 4px;
    background: transparent;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.form button[type="submit"]:hover {
    border-color: #555;
    color: #e5e5e5;
}

.forgot {
    color: #444;
    font-size: 0.75rem;
    margin-top: 10px;
    text-align: center;
}

.password-field {
    position: relative;
    display: flex;
}

.password-field input {
    flex: 1;
    padding-right: 60px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #444;
    cursor: pointer;
    padding: 4px;
    margin: 0;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: #888;
}

.error {
    color: #888;
    margin-top: 15px;
    font-size: 0.85rem;
}

/* Dashboard */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1a1a1a;
}

header h1 {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.signout-btn {
    background: transparent;
    border: none;
    color: #555;
    font-size: 0.8rem;
    cursor: pointer;
    letter-spacing: 0.05em;
}

.signout-btn:hover {
    color: #888;
}

.welcome {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #888;
}

.welcome span {
    color: #e5e5e5;
}

.dashboard-layout {
    display: flex;
    gap: 20px;
}

.left-panel {
    flex: 1;
    min-width: 0;
}

.right-panel {
    flex: 1;
    min-width: 0;
}

@media (max-width: 700px) {
    .dashboard-layout {
        flex-direction: column;
    }
}

.card {
    margin-bottom: 30px;
}

.card label {
    display: block;
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header label {
    margin-bottom: 0;
}

.card-links {
    display: flex;
    gap: 15px;
}

.card-links a {
    font-size: 0.75rem;
    color: #555;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.card-links a:hover {
    color: #e5e5e5;
}

/* Rating Slider */
.rating-slider {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rating-slider input[type="range"] {
    flex: 1;
    height: 2px;
    border-radius: 1px;
    background: #333;
    -webkit-appearance: none;
}

.rating-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #e5e5e5;
    border-radius: 50%;
    cursor: pointer;
}

#rating-value {
    font-size: 2rem;
    font-weight: 300;
    min-width: 40px;
    text-align: right;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: transparent;
    color: #e5e5e5;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #1a1a1a;
}

#rating-status {
    text-align: center;
    margin-top: 10px;
    color: #555;
    font-size: 0.8rem;
}

.year-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.year-selector label {
    margin-bottom: 0;
}

.year-nav {
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.year-nav:hover {
    color: #888;
}

/* Groups */
#groups-list {
    margin-bottom: 15px;
}

.group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    font-size: 0.9rem;
}

.group-item:hover {
    color: #fff;
}

.admin-badge {
    font-size: 0.65rem;
    color: #555;
    margin-left: 8px;
    letter-spacing: 0.05em;
}

.member-count {
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 0.05em;
    margin-left: auto;
}

#group-view .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

#group-view-title {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

#create-group-form,
#join-group-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#create-group-form input,
#join-group-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #222;
    border-radius: 4px;
    background: transparent;
    color: #e5e5e5;
    font-size: 0.85rem;
}

#create-group-form input:focus,
#join-group-form input:focus {
    outline: none;
    border-color: #444;
}

#create-group-form button,
#join-group-form button {
    padding: 10px 16px;
    border: 1px solid #333;
    border-radius: 4px;
    background: transparent;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
}

#create-group-form button:hover,
#join-group-form button:hover {
    border-color: #555;
    color: #e5e5e5;
}

/* Group Members */
.members-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #444;
    letter-spacing: 0.05em;
    padding-bottom: 8px;
    border-bottom: 1px solid #222;
    margin-bottom: 5px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
    font-size: 0.9rem;
}

.member-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.remove-btn {
    background: transparent;
    border: none;
    color: #444;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: #e5e5e5;
}

.group-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.group-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-action-link {
    font-size: 0.7rem;
    color: #444;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.group-action-link:hover {
    color: #888;
}

.member-rating {
    font-weight: 400;
}

.member-rating.not-rated {
    color: #333;
}

.invite-label {
    font-size: 0.7rem;
    color: #444;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.invite-section {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

#group-invite-link {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #222;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #888;
    background: #0a0a0a;
    margin: 0;
}

.copy-btn {
    padding: 10px 14px;
    border: 1px solid #333;
    border-radius: 4px;
    background: transparent;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover {
    border-color: #555;
    color: #e5e5e5;
}

.back-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid #222;
    border-radius: 4px;
    background: transparent;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 15px;
}

.back-btn:hover {
    border-color: #333;
    color: #e5e5e5;
}

/* About Page */
.about-section {
    text-align: center;
    padding-top: 60px;
}

.about-content {
    text-align: left;
    max-width: 500px;
    margin: 40px auto 0;
}

.about-content h2 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #888;
    margin-top: 30px;
    margin-bottom: 10px;
    text-transform: lowercase;
}

.about-content p {
    font-size: 0.95rem;
    color: #e5e5e5;
    line-height: 1.6;
    margin-bottom: 5px;
}

.scale {
    margin: 10px 0;
}

.scale .rating-num {
    color: #fff;
    font-weight: 500;
}

.about-footer {
    margin-top: 50px;
    text-align: center;
}

.about-footer a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
}

.about-footer a:hover {
    color: #e5e5e5;
}

.about-link {
    color: #444;
    text-decoration: none;
    font-size: 0.75rem;
    margin-top: 30px;
    display: inline-block;
}

.about-link:hover {
    color: #888;
}

/* Inline Input Rows */
.inline-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.inline-label {
    font-size: 0.8rem;
    color: #888;
    width: 80px;
    flex-shrink: 0;
}

.inline-input-row input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid #444;
    padding: 6px 0;
    color: #e5e5e5;
    font-size: 0.85rem;
}

.inline-input-row input[type="number"] {
    width: 50px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #444;
    padding: 6px 0;
    color: #e5e5e5;
    font-size: 0.85rem;
    text-align: center;
    -moz-appearance: textfield;
}

.inline-input-row input::-webkit-outer-spin-button,
.inline-input-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.inline-input-row input::placeholder {
    color: #555;
}

.inline-input-row input:focus {
    outline: none;
    border-bottom-color: #888;
}

.arrow-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
}

.arrow-btn:hover {
    color: #e5e5e5;
}

.rating-slider {
    margin-top: 10px;
}

/* Member Status */
.member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-status {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
    padding-left: 0;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Default Rating */
.member-rating.is-default {
    color: #666;
    font-style: italic;
}

.card-hint {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 10px;
}

