/* wxYams Website - Shared Styles */

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

/* Background variants */
body.bg-gradient {
    background: url('/bg.jpg') no-repeat center center fixed;
    background-size: cover;
}

body.bg-light {
    background: #f5f5f5;
}

/* Hide content until translations loaded */
body:not(.i18n-ready) [data-i18n] {
    visibility: hidden;
}

body.i18n-ready [data-i18n] {
    visibility: visible;
}

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

.container.narrow {
    max-width: 800px;
}

.container.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

/* Card */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card.small {
    max-width: 300px;
}

/* Typography */
h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #2c3e50;
}

h2 {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #34495e;
}

h3 {
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

p {
    margin-bottom: 15px;
}

/* White text (for gradient backgrounds) */
.text-white {
    color: white;
}

.text-white h1,
.text-white h2,
.text-white h3 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    border-bottom-color: rgba(255,255,255,0.3);
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    text-decoration: underline;
}

.text-white a {
    color: white;
    opacity: 0.9;
}

.text-white a:hover {
    opacity: 1;
}

/* Lists */
ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    text-decoration: none;
}

.btn-outline {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.3);
    text-decoration: none;
    transform: scale(1.05);
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.badge-free {
    background: #27ae60;
    color: white;
}

.badge-premium {
    background: #3498db;
    color: white;
}

/* Navigation */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-bottom: 30px;
}

.navbar.transparent {
    background: transparent;
}

.navbar-brand {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
}

.navbar-nav a {
    color: white;
    opacity: 0.9;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.3);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    min-width: 150px;
    z-index: 1000;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
}

.lang-dropdown a:hover {
    background: #f5f5f5;
}

.lang-dropdown a.active {
    background: #3498db;
    color: white;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9em;
}

.footer a {
    color: white;
    margin: 0 10px;
}

.footer.dark {
    color: #7f8c8d;
}

.footer.dark a {
    color: #3498db;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #3498db;
    color: white;
}

tr:hover {
    background: #f5f5f5;
}

/* Info box */
.info-box {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* App Cards (Home page) */
.apps-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.app-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    width: 280px;
    color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    text-align: left;
}

.app-card:hover {
    transform: translateY(-5px);
}

.app-card h3 {
    margin-bottom: 10px;
    margin-top: 0;
    color: #2c3e50;
}

.app-card p {
    color: #7f8c8d;
    font-size: 0.95em;
}

.app-card .features {
    margin: 15px 0;
    font-size: 0.9em;
}

.app-card .features li {
    margin: 8px 0;
}

/* Logo animation */
.logo {
    font-size: 4em;
    margin-bottom: 20px;
}

.logo .dice {
    display: inline-block;
    animation: roll 3s infinite;
}

@keyframes roll {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .apps-grid {
        flex-direction: column;
        align-items: center;
    }

    .app-card {
        width: 100%;
        max-width: 350px;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}

@media (max-width: 600px) {
    .menu-toggle {
        display: block;
    }

    .navbar-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
    }

    .navbar-nav.show {
        display: flex;
    }
}
