/**
 * Main CSS for Droid Cities
 * Consolidated styles for all game pages
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #333;
}

/* Index/Splash Page Styles */
.splash-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.splash-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-title {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Michroma', sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(102, 126, 234, 0.8);
    z-index: 15;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.game-title .first-letter {
    font-size: 1.3em;
}

.game-slogan {
    position: absolute;
    top: 16%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Michroma', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 1px 5px rgba(102, 126, 234, 0.8);
    z-index: 15;
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

/* Game title and slogan for regular pages (above container) */
.page-body .game-title {
    position: relative;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    text-shadow: none;
    z-index: auto;
    margin-bottom: 0;
    padding-top: 20px;
    width: fit-content;
}

.page-body .game-slogan {
    position: relative;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    text-shadow: none;
    z-index: auto;
    margin-bottom: 20px;
    width: fit-content;
}

.splash-card {
    position: relative;
    width: 600px;
    height: 600px;
    max-width: 600px;
    max-height: 600px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
    box-sizing: border-box;
}

.droid-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.droid-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 4px solid white;
    transition: transform 0.3s;
    position: relative;
    background: white;
}

.droid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.droid-image:hover {
    transform: scale(1.1);
}

.droid-image {
    cursor: pointer;
}

.word-bubble {
    position: absolute;
    background: white;
    border: 3px solid #667eea;
    border-radius: 20px;
    padding: 12px 18px;
    font-size: 0.9rem;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 220px;
    min-width: 120px;
    text-align: center;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.4;
    word-wrap: break-word;
}

.word-bubble.show {
    opacity: 1;
}

.word-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.word-bubble::before {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 29px;
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 11px solid #667eea;
}

.splash-button {
    position: absolute;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid transparent;
    border-radius: 999px;
    font-family: 'Michroma', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    letter-spacing: 0.15em;
}

.splash-button:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-rules {
    top: 10%;
    left: 5%;
}

.btn-faq {
    top: 10%;
    right: 5%;
}

.btn-login {
    bottom: 10%;
    left: 5%;
}

.btn-legal {
    bottom: 10%;
    right: 5%;
}

/* Page Container Styles */
.page-body {
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Auth page container (login/register) */
body.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.auth-body .container {
    max-width: 400px;
    padding: 40px;
}

.container h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5rem;
    font-family: 'Michroma', sans-serif;
}

body.auth-body .container h1 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.form-error,
.error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
}

.hint {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Ensure message appears below form in auth pages */
body.auth-body .container .message {
    display: block;
    position: static;
    float: none;
    width: 100%;
    clear: both;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

body.auth-body .container .message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
    padding: 12px;
    border-radius: 8px;
}

/* Auth page button styles */
body.auth-body button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.auth-body button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

body.auth-body button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.link a:hover {
    text-decoration: underline;
}

.link .btn-home {
    display: inline-block;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 6px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s;
}

.link .btn-home:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

/* Rules Page Styles */
.content {
    line-height: 1.8;
    color: #333;
}

.content h2 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: 'Michroma', sans-serif;
}

.content h3 {
    color: #764ba2;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-family: 'Michroma', sans-serif;
}

.content p {
    margin-bottom: 15px;
}

.content ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content li {
    margin-bottom: 8px;
}

/* FAQ Page Styles */
.faq-item {
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    color: #667eea;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Michroma', sans-serif;
}

.faq-answer {
    color: #333;
    line-height: 1.8;
}

/* Legal Page Styles */
.legal-section {
    margin-bottom: 30px;
}

.legal-section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: 'Michroma', sans-serif;
}

.legal-section h3 {
    color: #764ba2;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-family: 'Michroma', sans-serif;
}

.legal-section p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
}

.legal-section ul {
    margin-left: 30px;
    margin-bottom: 15px;
    color: #333;
}

.legal-section li {
    margin-bottom: 8px;
    line-height: 1.8;
}

/* Cookie Page Styles */
.cookie-section {
    margin-bottom: 30px;
}

.cookie-section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: 'Michroma', sans-serif;
}

.cookie-section h3 {
    color: #764ba2;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-family: 'Michroma', sans-serif;
}

.cookie-section p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
}

.cookie-section ul {
    margin-left: 30px;
    margin-bottom: 15px;
    color: #333;
}

.cookie-section li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.cookie-table th,
.cookie-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cookie-table th {
    background-color: #f8f9fa;
    color: #667eea;
    font-weight: 600;
}

/* Common Styles */
.back-link {
    display: inline-block;
    margin-top: 30px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
        top: 5%;
    }

    .game-slogan {
        font-size: 1rem;
        top: 13%;
    }

    .splash-card {
        width: 90vw;
        height: 90vw;
        max-width: 500px;
        max-height: 500px;
    }

    .droid-image {
        width: 200px;
        height: 200px;
    }

    .splash-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        min-width: 90px;
    }

    .container {
        padding: 30px;
    }

    .container h1 {
        font-size: 2rem;
    }

    .page-body .game-title {
        font-size: 2rem;
    }

    .page-body .game-slogan {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
        top: 3%;
    }

    .game-slogan {
        font-size: 0.85rem;
        top: 11%;
    }

    .splash-button {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        min-width: 80px;
    }

    .container {
        padding: 20px;
    }

    .container h1 {
        font-size: 1.75rem;
    }

    .page-body .game-title {
        font-size: 1.75rem;
    }

    .page-body .game-slogan {
        font-size: 0.85rem;
    }
}

/* ============================================
   Admin Panel Styles (matches app.php theme)
   ============================================ */

.admin-body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
}

.admin-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2a5298;
    font-family: 'Michroma', sans-serif;
}

.admin-header .user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-header .username {
    font-weight: 500;
    color: #2a5298;
}

.admin-header .nav-link {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    background: #f0f4ff;
}

.admin-header .nav-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-body button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.admin-body button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.admin-body button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.admin-body button.danger {
    background: #dc3545;
}

.admin-body button.danger:hover {
    background: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.admin-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-tabs .tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.admin-tabs .tab:hover {
    background: #f0f4ff;
    color: #2a5298;
}

.admin-tabs .tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-content h2 {
    color: #2a5298;
    font-family: 'Michroma', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.admin-content h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.admin-body .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-body .stat-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eeff 100%);
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.admin-body .stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.admin-body .stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: #2a5298;
}

.admin-body .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    font-size: 1rem;
    color: #666;
}

.admin-body .error {
    text-align: center;
    padding: 2rem;
    font-size: 1rem;
    color: #dc3545;
}

.admin-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-body th,
.admin-body td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-body th {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eeff 100%);
    color: #2a5298;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.admin-body tr:hover {
    background: #f8f9ff;
}

.admin-body .actions {
    display: flex;
    gap: 0.5rem;
}

.admin-body .btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.admin-body .user-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-body .user-management-header h2 {
    margin: 0;
    color: #667eea;
}

.admin-body .search-box {
    margin-bottom: 1.5rem;
}

.admin-body .search-box input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.admin-body .search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.admin-body .limit-select {
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.admin-body .limit-select:focus {
    outline: none;
    border-color: #667eea;
}

.admin-body .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.admin-body .modal.active {
    display: flex;
}

.admin-body .modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.admin-body .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.admin-body .modal-header h2 {
    color: #2a5298;
    font-family: 'Michroma', sans-serif;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.admin-body .close-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: color 0.3s;
}

.admin-body .close-btn:hover {
    color: #333;
    transform: none;
    box-shadow: none;
}

.admin-body .form-group {
    margin-bottom: 1.25rem;
}

.admin-body .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-body .form-group input,
.admin-body .form-group select,
.admin-body .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.admin-body .form-group input:focus,
.admin-body .form-group select:focus,
.admin-body .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.admin-body .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.admin-body .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.admin-body .pagination span {
    color: #666;
    font-weight: 500;
}

.admin-body .alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.admin-body .alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-body .alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-body .cron-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-body .cron-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8eeff 100%);
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.admin-body .cron-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2a5298;
    margin-bottom: 0.5rem;
}

.admin-body .cron-desc {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.admin-body .cron-result {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    border: 1px solid #e0e0e0;
}

.admin-body .cron-result h4 {
    color: #2a5298;
    margin-bottom: 0.75rem;
}

.admin-body .cron-result pre {
    background: #1e3c72;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    overflow-x: auto;
    color: #8bc34a;
}

.admin-body .status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-body .status-N {
    background: #cce5ff;
    color: #004085;
}

.admin-body .status-A {
    background: #d4edda;
    color: #155724;
}

.admin-body .status-B {
    background: #f8d7da;
    color: #721c24;
}

.admin-body .stats-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-body .stats-section h3 {
    color: #2a5298;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.admin-body .users-section {
    margin-top: 1.5rem;
}

.admin-body .users-section h3 {
    color: #2a5298;
    margin-bottom: 1rem;
}
