/* style.css */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --border-radius: 8px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Auth Pages (Login/Register) */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

h2, h3 { color: var(--secondary-color); margin-bottom: 20px; }

/* Forms */
input[type="text"], input[type="password"], input[type="file"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    display: block;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    width: 100%;
}

button:hover { background-color: #2980b9; }
button:disabled { background-color: #bdc3c7; cursor: not-allowed; }

/* Header & Nav */
header {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info { display: flex; align-items: center; gap: 15px; }
.btn-logout {
    background-color: transparent; border: 1px solid var(--danger-color);
    color: var(--danger-color); padding: 8px 15px; text-decoration: none;
    border-radius: var(--border-radius); font-size: 14px;
}
.btn-logout:hover { background: var(--danger-color); color: white; }

/* Dashboard sections */
.panel {
    background: white; padding: 25px; border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 20px;
}

.upload-section { max-width: 500px; margin: 0 auto 20px auto; text-align: center;}

/* Admin Section */
.admin-panel { border-left: 5px solid #f1c40f; background-color: #fffdf5; }

/* Tables */
table {
    width: 100%; border-collapse: collapse; margin-top: 10px;
    background: white; overflow: hidden; border-radius: var(--border-radius);
}

th, td { text-align: left; padding: 15px; border-bottom: 1px solid #eee; }
th { background-color: var(--secondary-color); color: white; }
tr:last-child td { border-bottom: none; }
tr:hover { background-color: #fbfbfb; }

/* Links inside tables */
table a { text-decoration: none; font-weight: bold; }
table a.direct-link { color: var(--primary-color); }
table a.direct-link:hover { text-decoration: underline; }
table a.action-link { color: var(--success-color); }
table a.delete-link { color: var(--danger-color); }

/* Messages */
.alert { padding: 15px; border-radius: var(--border-radius); margin-bottom: 20px; font-weight: bold; }
.alert-success { background-color: #d4edda; color: var(--success-color); border: 1px solid #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: var(--danger-color); border: 1px solid #f5c6cb; }
.status-badge { padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; }
.status-approved { background-color: #d4edda; color: var(--success-color); }
.status-pending { background-color: #fff3cd; color: #856404; }

/* Mobile responsiveness */
@media (max-width: 768px) {
    header { flex-direction: column; text-align: center; gap: 10px; }
    table { font-size: 14px; }
    th, td { padding: 10px 5px; }
    .hide-mobile { display: none; }
}


/* --- EMBED MODAL STYLING --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 85%;
    width: 800px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--primary-color); }

.embed-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.embed-container img { max-width: 100%; max-height: 70vh; height: auto; border-radius: 4px; }
.embed-container video, .embed-container audio { width: 100%; max-height: 70vh; }
.embed-container iframe { width: 100%; height: 70vh; border: none; }
.btn-embed { color: #9b59b6; cursor: pointer; margin-right: 10px; font-weight: bold; text-decoration: none; }
.btn-embed:hover { text-decoration: underline; }



/* Admin Navigáció */
.admin-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.admin-nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}
.admin-nav a:hover, .admin-nav a.active {
    background-color: var(--primary-color);
    color: white;
}