/* Auth Pages Styling */
.profile-container, .user-stories-container {
    margin-bottom: 30px;
}

.profile-info h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.credits {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.credit-count {
    font-weight: bold;
    color: var(--primary-color);
}

.profile-settings {
    margin-bottom: 25px;
}

.profile-settings h3 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.2em;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.profile-form .form-group {
    margin-bottom: 15px;
}

.profile-form label {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.profile-form input[type="checkbox"] {
    margin-right: 10px;
}

.help-text {
    font-size: 0.9em;
    color: var(--gray);
    margin-top: 5px;
    margin-left: 25px;
}

.profile-actions {
    margin-top: 20px;
}

/* Story Table Styling */
.story-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.story-table th, .story-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.story-table th {
    background-color: rgba(106, 17, 203, 0.05);
    font-weight: 600;
    color: var(--primary-color);
}

.story-table tr:hover {
    background-color: rgba(106, 17, 203, 0.02);
}

.story-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85em;
}

/* Toggle Switch for Privacy */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 15px;
    transition: .4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    position: absolute;
    right: 10px;
    top: 6px;
    color: white;
    font-size: 0.8em;
    font-weight: 600;
}

input:not(:checked) + .toggle-slider + .toggle-label {
    right: auto;
    left: 10px;
}

/* Privacy Form */
.privacy-form {
    margin: 0;
}

/* Login and Register Forms */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 1em;
}

.auth-form .form-actions {
    margin-top: 25px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .story-table {
        display: block;
        overflow-x: auto;
    }
    
    .toggle-switch {
        width: 60px;
    }
    
    .toggle-label {
        display: none;
    }
}

/* Animation for privacy toggle */
@keyframes updating {
    0% { background-color: rgba(106, 17, 203, 0.05); }
    50% { background-color: rgba(106, 17, 203, 0.2); }
    100% { background-color: rgba(106, 17, 203, 0.05); }
}

tr.updating {
    animation: updating 1s ease-in-out;
}
