:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(56,189,248,0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.lang-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

select {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
}

select:hover {
    border-color: var(--accent);
}

select option {
    background: #1e1b4b;
    color: white;
}

.container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    margin: 80px auto 40px auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.8s ease-out forwards;
}

.container-legal {
    text-align: left;
    max-width: 1000px;
}

.container-legal h1, .container-legal h2, .container-legal h3 {
    text-align: left;
    margin-top: 30px;
    margin-bottom: 15px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container-legal h1 {
    font-size: 2.5rem;
}

.container-legal p {
    text-align: left;
    margin-bottom: 15px;
    line-height: 1.8;
}

.container-legal a {
    color: var(--accent);
    text-decoration: none;
}

.container-legal a:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.system-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.code-wrapper {
    position: relative;
    margin: 30px 0;
    text-align: left;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.copy-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.2);
}

.copy-icon {
    transition: transform 0.3s ease;
}

.copy-btn:hover .copy-icon {
    transform: scale(1.1);
}

code {
    display: block;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    padding: 30px 20px 20px 20px; /* Extra top padding for copy button */
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #4ade80;
    overflow-x: auto;
    line-height: 1.5;
}

.apps-gallery {
    margin-top: 50px;
    border-top: 1px solid var(--glass-border);
    padding-top: 40px;
}

.apps-gallery h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-main);
    text-align: center;
}

.icons-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
    width: 100px;
}

.icon-box:hover {
    transform: translateY(-5px);
}

.icon-box img {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.icon-box span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

footer {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.btn-back {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .container { padding: 25px; margin-top: 60px; }
}

.security-warning {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    color: #fca5a5;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.5;
}

.security-warning span {
    font-family: 'Fira Code', monospace;
    color: #ef4444;
    font-weight: bold;
}
