/* General styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

:root {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --modal-bg: #ffffff;
    --banner-bg: #ccd0d4;
    --banner-text: #0ea5e9;
    --banner-desc: #64748b;
    --popup-bg: #ffffff;
    --popup-border: #e2e8f0;
    --shadow-color: rgba(0,0,0,0.05);
}

/* Dark mode overrides */
.dark-mode {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --header-bg: #1e293b;
    --card-bg: #1e293b;
    --primary-color: #60a5fa;
    --secondary-color: #94a3b8;
    --modal-bg: #334155;
    --banner-bg: #1e293b;
    --banner-text: #38bdf8;
    --banner-desc: #94a3b8;
    --popup-bg: #1e293b;
    --popup-border: #334155;
    --shadow-color: rgba(0,0,0,0.2);
}

/* Header styles */
header {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--header-bg);
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px var(--shadow-color);
    transition: background-color 0.3s, color 0.3s;
}

header h1 {
    font-size: 1.7rem;
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sticky-up h1 i {
    color: var(--primary-color);
}

/* User area */
.user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* Dashboard buttons */
.dashboard-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.add-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.surf-btn {
    background-color: var(--card-bg);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

/* Button styles */
.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn.primary { 
    background: var(--primary-color); 
    color: #fff; 
}

.btn.secondary { 
    background: var(--secondary-color); 
    color: #fff; 
}

.btn:disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
}

/* Modal styles - Unified */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--modal-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px var(--shadow-color);
    border: 1px solid var(--popup-border);
}
.modal-content h2 {
    margin-bottom: 15px;
    color: var(--text-color);
}
.modal-content p {
    margin-bottom: 15px;
    color: var(--text-color);
}
.modal-content input[type="text"],
.modal-content input[type="url"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--popup-border);
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--text-color);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    font-weight: bold;
}

.close-btn:hover {
    color: var(--primary-color);
}

#linkMessage {
    font-size: 14px;
    margin-bottom: 10px;
}

#linkMessage.success { color: #22c55e; }
#linkMessage.error { color: #ef4444; }

/* Banner styles */
.banner-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 15px;
}

.banner-item {
    background: var(--banner-bg);
    color: var(--banner-text);
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 2px 8px var(--shadow-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.banner-item:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 16px var(--shadow-color);
}

.banner-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--text-color);
}

.banner-link {
    color: var(--banner-text);
    text-decoration: underline;
    word-break: break-all;
    margin-bottom: 4px;
}

.banner-desc {
    font-size: 0.98rem;
    color: var(--banner-desc);
}

/* Support button */
.support-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s;
    z-index: 999;
}

.support-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px var(--shadow-color);
}

#notifyBell {
    font-size: 30px;
    color: var(--primary-color);
}

.notification-wrapper {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 10px;
    font-weight: bold;
}

/* Notification cards */
.notification-card {
    background-color: var(--popup-bg);
    color: var(--text-color);
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 3px 8px var(--shadow-color);
    margin: 10px;
    border: 1px solid var(--popup-border);
    transition: all 0.3s;
}

.notification-card .alert-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text-color);
}

.notification-card .alert-content {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-color);
}

.notification-card a {
    color: var(--primary-color);
    text-decoration: underline;
}

.notification-card .alert-date {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Surf page */
#surfFrame {
    height: 100vh;
    width: 100%;
    border: none;
}

/* Captcha container */
#captchaC {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    background-color: var(--popup-bg);
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    box-shadow: 0 2px 5px var(--shadow-color);
    border: 1px solid var(--popup-border);
}

#captchaC label {
    font-size: 18px;
    font-weight: bold;
    margin-right: 15px;
    color: var(--text-color);
}

#captchaInput {
    width: 120px;
    height: 40px;
    font-size: 20px;
    border-radius: 5px;
    padding: 5px;
    border: 1px solid var(--secondary-color);
    margin: 0 10px;
    background: var(--card-bg);
    color: var(--text-color);
}

#captchaBtn {
    width: 80px;
    height: 40px;
    font-size: 16px;
    border-radius: 5px;
    margin-left: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

#captchaBtn:hover {
    background-color: var(--secondary-color);
}

#captchaMsg {
    margin-left: 10px;
    color: #ef4444;
    font-weight: bold;
}

/* Tickets container */
.tickets-container {
    margin: 20px;
    padding: 15px;
    /* background: var(--card-bg); */
    border-radius: 8px;
    /* box-shadow: 0 2px 4px var(--shadow-color); */
}

.ticket-item {
    border: 1px solid var(--popup-border);
    background: var(--card-bg);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px var(--shadow-color);
    border: 3px solid var(--popup-border);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-color);
}

.ticket-header h3 {
    margin: 0;
    color: var(--text-color);
}

.ticket-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.ticket-status.open {
    background: #22c55e;
    color: white;
}

.ticket-status.done {
    background: #0099ff;
    color: white;
}

.ticket-status.closed {
    background: #6b7280;
    color: white;
}

.ticket-body {
    color: var(--text-color);
}

.ticket-body p {
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.ticket-body small {
    color: var(--secondary-color);
    font-size: 12px;
}
#openTicketBtn{
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}
/* Button styles */
.ticket-actions button {
    padding: 8px 16px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.delete-btn {
    background-color: #ef4444;
    color: white;
}

.cancel-btn {
    background-color: #6b7280;
    color: white;
}

.delete-btn:hover {
    background-color: #dc2626;
}

.cancel-btn:hover {
    background-color: #4b5563;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--popup-border);
    border-radius: 4px;
    box-sizing: border-box;
    background: var(--card-bg);
    color: var(--text-color);
}

.form-group textarea {
    resize: vertical;
}

/* Submit button */
button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: var(--secondary-color);
}

/* Theme switch - Unified */

.theme-switch-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    right: auto !important;
    z-index: 999999 !important;
    opacity: 1 !important;
    display: block !important;
    margin: 0 !important;
    margin-left: 20px !important;
 
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 55px;
    height: 30px;
    box-shadow: 0 4px 12px var(--shadow-color);
    border-radius: 34px;
    background: var(--card-bg);
    border: 1px solid var(--popup-border);
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.switch-slider::before {
    position: absolute;
    content: "🌙";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-size: 14px;
    transition: 0.4s;
}

.theme-switch input:checked + .switch-slider {
    background-color: #3b82f6;
}

.theme-switch input:checked + .switch-slider::before {
    transform: translateX(25px);
    content: "☀️";
}


/* Surf Header Styles */
.surf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-color, #dfe2e7);
    padding: 10px;
    position: relative;
    z-index: 100;
}

.surf-title {
    color: var(--primary-color, #3b82f6);
    margin: 0;
}

.surf-timer {
    font-weight: bold;
}

.surf-timer span {
    color: var(--timer-color, rgb(170, 65, 65));
    font-weight: bold;
}

/* Dark mode styles */
.dark-mode .surf-header {
    background-color: var(--bg-color, #1a1a1a);
}

.dark-mode .surf-title {
    color: var(--dark-primary-color, #60a5fa);
}

.dark-mode .surf-timer span {
    color: var(--dark-timer-color, #f87171);
}

/* Navigation icon */
#goToHome {
    color: var(--primary-color, #3b82f6);
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.dark-mode #goToHome {
    color: var(--dark-primary-color, #60a5fa);
}

#goToHome:hover {
    opacity: 0.8;
}

