/**
 * Twitch Login System - Frontend Styles
 */

/* Login Button */
.twitch-login-btn {
    background: #9146ff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.twitch-login-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.3);
}

.twitch-login-btn:active {
    transform: translateY(0);
}

.twitch-login-btn svg {
    width: 20px;
    height: 20px;
}

/* User Info Display */
.twitch-user-info {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.twitch-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #9146ff;
}

.twitch-username {
    font-weight: 600;
    color: #333;
}

.twitch-logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.twitch-logout-btn:hover {
    background: #c82333;
}

/* Login Modal */
.twitch-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.twitch-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.twitch-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 20px;
    cursor: pointer;
    line-height: 1;
}

.twitch-modal-close:hover {
    color: #333;
}

.twitch-modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.twitch-modal-header h2 {
    margin: 0 0 10px;
    color: #333;
    font-size: 24px;
}

.twitch-modal-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.twitch-modal-body {
    padding: 30px;
}

.twitch-benefits {
    margin-bottom: 30px;
}

.twitch-benefits h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 18px;
}

.twitch-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.twitch-benefits li {
    padding: 8px 0;
    color: #555;
    font-size: 15px;
}

.twitch-login-actions {
    text-align: center;
}

.twitch-login-button {
    background: #9146ff;
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.twitch-login-button:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(145, 70, 255, 0.3);
    color: white;
    text-decoration: none;
}

.twitch-login-button svg {
    width: 24px;
    height: 24px;
}

.privacy-note {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

/* User Profile */
.twitch-user-profile {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #9146ff;
}

.profile-info h3 {
    margin: 0 0 5px;
    font-size: 24px;
    color: #333;
}

.twitch-username {
    color: #9146ff;
    font-weight: 600;
    font-size: 16px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #9146ff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.recent-contributions h4 {
    margin: 0 0 20px;
    color: #333;
    font-size: 18px;
}

.contributions-list {
    margin-bottom: 12px;
}

.contribution-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #9146ff;
    margin-bottom: 12px;
}

.contribution-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.contribution-details {
    flex: 1;
}

.contribution-amount {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.contribution-object {
    display: block;
    color: #666;
    font-size: 14px;
    margin: 2px 0;
}

.contribution-date {
    display: block;
    color: #888;
    font-size: 12px;
}

/* Notifications */
.twitch-login-success-notification,
.twitch-contribution-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #28a745;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.twitch-contribution-notification {
    border-left-color: #9146ff;
}

.twitch-login-success-notification.show,
.twitch-contribution-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-icon,
.contribution-icon {
    font-size: 20px;
}

.success-message,
.contribution-text {
    font-weight: 600;
    color: #333;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #333;
}

/* Modal body class */
body.twitch-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .twitch-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .twitch-modal-header,
    .twitch-modal-body {
        padding: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contribution-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .twitch-login-success-notification,
    .twitch-contribution-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .twitch-login-success-notification.show,
    .twitch-contribution-notification.show {
        transform: translateY(0);
    }
}