/* Profile Styles */
.profile-main {
    min-height: calc(100dvh - 140px);
    min-height: calc(100% - 140px);
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Dark mode styles */
[data-theme="dark"] .profile-main {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.profile-header {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

[data-theme="dark"] .profile-header {
    background: var(--bg-secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-avatar-section {
    position: relative;
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
}

.profile-avatar:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-upload-overlay i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-info {
    flex: 1;
    min-width: 300px;
}

.profile-info h1 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

[data-theme="dark"] .profile-info h1 {
    color: var(--text-primary);
}

.username {
    color: #666;
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
}

[data-theme="dark"] .username {
    color: var(--text-secondary);
}

.bio {
    color: #555;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

[data-theme="dark"] .bio {
    color: var(--text-secondary);
}

.profile-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.profile-content {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .profile-content {
    background: var(--bg-secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

[data-theme="dark"] .profile-tabs {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

[data-theme="dark"] .tab-btn {
    color: var(--text-secondary);
}

.tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

[data-theme="dark"] .tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: white;
}

[data-theme="dark"] .tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: var(--bg-secondary);
}

.tab-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .detail-section h3 {
    color: var(--text-primary);
    border-bottom-color: var(--accent-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

[data-theme="dark"] .detail-item {
    background: var(--bg-tertiary);
    border-left-color: var(--accent-color);
}

.detail-item label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

[data-theme="dark"] .detail-item label {
    color: var(--text-primary);
}

.detail-item span {
    color: #666;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

[data-theme="dark"] .detail-item span {
    color: var(--text-secondary);
}

.social-links {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

[data-theme="dark"] .social-item {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.social-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

[data-theme="dark"] .social-item:hover {
    background: var(--bg-hover);
}

.social-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.social-item.disabled:hover {
    background: #f8f9fa;
    transform: none;
}

[data-theme="dark"] .social-item.disabled:hover {
    background: var(--bg-tertiary);
}

.social-item i {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.social-item .fab.fa-twitter {
    color: #1da1f2;
}

.social-item .fab.fa-youtube {
    color: #ff0000;
}

.social-item .fab.fa-twitch {
    color: #9146ff;
}

.social-item .fab.fa-discord {
    color: #5865f2;
}

.settings-section {
    max-width: 600px;
}

.settings-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.setting-item label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-secondary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

[data-theme="dark"] .modal-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

[data-theme="dark"] .modal-header h2 {
    color: var(--text-primary);
}

.modal-close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
}

.modal-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .modal-close {
    color: var(--text-secondary);
}

[data-theme="dark"] .modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

[data-theme="dark"] .modal-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

[data-theme="dark"] .form-group label {
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    display: block;
    text-align: right;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

[data-theme="dark"] .form-section {
    border-top: 1px solid var(--border-color);
}

.form-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

[data-theme="dark"] .form-section h3 {
    color: var(--text-primary);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #9146ff;
    color: white;
}

.btn-primary:hover {
    background: #a66cfb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Profile Navigation */
.profile-nav {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .profile-nav {
    background: var(--bg-tertiary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

[data-theme="dark"] .nav-tab {
    color: var(--text-secondary);
}

.nav-tab:hover {
    background: #e9ecef;
    color: #333;
}

[data-theme="dark"] .nav-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-tab.active {
    background: #007bff;
    color: white;
}

[data-theme="dark"] .nav-tab.active {
    background: var(--accent-color);
    color: white;
}

/* Info Grid and Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .info-card {
    background: var(--bg-tertiary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.info-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .info-card h3 {
    color: var(--text-primary);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

[data-theme="dark"] .info-item {
    border-bottom-color: var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #333;
}

[data-theme="dark"] .info-label {
    color: var(--text-primary);
}

.info-value {
    color: #666;
    text-align: right;
}

[data-theme="dark"] .info-value {
    color: var(--text-secondary);
}

.info-value.link {
    color: #007bff;
    text-decoration: none;
}

[data-theme="dark"] .info-value.link {
    color: var(--accent-color);
}

.info-value.link:hover {
    text-decoration: underline;
}

/* Settings Card */
.settings-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .settings-card {
    background: var(--bg-tertiary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.settings-card h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .settings-card h3 {
    color: var(--text-primary);
}

.settings-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .settings-card p {
    color: var(--text-secondary);
}

.settings-actions {
    display: flex;
    gap: 1rem;
}

/* No Social Links Message */
.no-social {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

[data-theme="dark"] .no-social {
    color: var(--text-secondary);
}

/* Profile Message Styles */
.message {
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    position: relative;
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
}

.message.info {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

.message.success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

[data-theme="dark"] .message.info {
    background-color: #1a237e;
    color: #90caf9;
    border-left-color: #2196f3;
}

[data-theme="dark"] .message.success {
    background-color: #1b5e20;
    color: #a5d6a7;
    border-left-color: #4caf50;
}

[data-theme="dark"] .message.error {
    background-color: #b71c1c;
    color: #ef9a9a;
    border-left-color: #f44336;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-info {
        min-width: auto;
    }
    
    .profile-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-bottom: none;
        border-right-color: #007bff;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-item span {
        max-width: 100%;
        text-align: left;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-main {
        padding: 1rem 0;
    }
    
    .profile-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile-info h1 {
        font-size: 1.5rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
}