/* =========================================================
   WGS UNIFIED STYLESHEET
   Works for: wiseguysolutions.net + .a.wgs_tools
   ========================================================= */

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

/* BODY – DEFAULT */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: radial-gradient(circle at top, #041326 0%, #031225 45%, #020617 70%, #000 100%);
    color: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* SVG HANDS OVERLAY */
.hands-svg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.22;
}

/* MAIN CONTAINER */
.container {
    text-align: center;
    max-width: 640px;
    animation: fadeIn 1s ease-in;
    position: relative;
    z-index: 1;
}

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

/* LOGO */
.logo {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #22c55e 0%, #14f4ff 45%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

/* HEADINGS & TEXT */
h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    color: #f9fafb;
}

p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* STATUS BADGE */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid #22c55e;
    color: #bbf7d0;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.4);
}

.status span:first-child {
    font-size: 1rem;
}

/* APP CARDS (Landing Page) */
.apps {
    display: flex;
    gap: 1.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.app-card {
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 18px;
    padding: 1.8rem 2rem;
    min-width: 210px;
    backdrop-filter: blur(18px);
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.9),
        0 0 0 1px rgba(15, 23, 42, 0.9);
}

.app-card h3 {
    font-size: 1rem;
    color: #3b82f6;
    margin-bottom: 0.55rem;
}

.app-card p {
    font-size: 0.9rem;
    color: #9ca3af;
    margin: 0;
}

.app-card:nth-child(3) {
    margin-top: 1.4rem;
}

/* FLOATING TOOLS BUTTON */
.tools-button {
    position: fixed;
    right: 24px;
    bottom: 84px;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.8);
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.95),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    z-index: 9999;
    transition:
        transform 0.18s ease-out,
        box-shadow 0.18s ease-out,
        background 0.18s ease-out,
        border-color 0.18s ease-out;
}

.tools-button:hover {
    background: radial-gradient(circle at 50% 0%, #22c55e 0%, #0f172a 55%);
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow:
        0 18px 40px rgba(34, 197, 94, 0.4),
        0 0 0 1px rgba(15, 23, 42, 0.98);
}

.tools-button:active {
    transform: translateY(0);
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.95),
        0 0 0 1px rgba(15, 23, 42, 0.98);
}

/* =========================================================
   FOOTER (GLOBAL WGS FOOTER)
   ========================================================= */

.wgs-footer {
    width: 100%;
    margin-top: 60px;
    padding: 28px 0 32px 0;
    background: rgba(15, 23, 42, 0.55);
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    backdrop-filter: blur(14px);
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
}

.wgs-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 900px;
    width: 100%;
}

.wgs-footer-copy {
    font-size: 0.9rem;
    color: #94a3b8;
    letter-spacing: 0.02em;
    text-align: center;
}

.wgs-footer-copy a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wgs-footer-copy a:hover {
    color: #22c55e;
}

.wgs-footer-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.wgs-pill {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    transition: all 0.18s ease-out;
}

.wgs-pill:hover {
    border-color: #22c55e;
    color: #bbf7d0;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 6px 14px rgba(34, 197, 94, 0.25);
    transform: translateY(-1px);
}

.wgs-pill:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.85);
}

/* MOBILE – LANDING */
@media (max-width: 640px) {
    .container { max-width: 100%; }
    .logo { font-size: 2.2rem; }
    h1 { font-size: 2.1rem; }
    p { font-size: 1rem; }
    .apps { gap: 1.3rem; }
    .app-card { min-width: 100%; }
    .app-card:nth-child(3) { margin-top: 0.6rem; }
}

/* =========================================================
   LEGAL PAGES (Terms, Privacy) - "Held by Hands" Effect
   ========================================================= */

.legal-page {
    display: block;
    overflow-y: auto;
    padding: 60px 20px 40px;
    min-height: 100vh;
    justify-content: flex-start;
}

.legal-container {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.back-link:hover {
    color: #22c55e;
    border-color: #22c55e;
    transform: translateX(-4px);
}

.legal-shell {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    box-shadow: 
        0 24px 70px rgba(15, 23, 42, 0.9),
        0 0 80px rgba(59, 130, 246, 0.08);
    overflow: hidden;
}

.legal-header {
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.2), transparent 70%);
    padding: 40px 40px 30px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.legal-header h1 {
    font-size: 2rem;
    color: #f9fafb;
    margin-bottom: 8px;
}

.legal-updated {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.legal-content {
    padding: 40px;
}

.legal-section {
    margin-bottom: 36px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 1.3rem;
    color: #e2e8f0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.legal-section h3 {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-top: 16px;
    margin-bottom: 8px;
}

.legal-section p {
    font-size: 1rem;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-section ul {
    margin: 12px 0 16px 24px;
    color: #cbd5e1;
}

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

.legal-section a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-section a:hover {
    color: #22c55e;
    text-decoration: underline;
}

.legal-contact {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Legal Page Mobile */
@media (max-width: 640px) {
    .legal-page {
        padding: 40px 16px 30px;
    }
    
    .legal-header {
        padding: 30px 24px 20px;
    }
    
    .legal-header h1 {
        font-size: 1.6rem;
    }
    
    .legal-content {
        padding: 24px;
    }
    
    .legal-section h2 {
        font-size: 1.15rem;
    }
}

/* =========================================================
   KEYGEN TOOL STYLES (scoped to body.keygen-page)
   ========================================================= */

.keygen-page {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    padding: 20px 0;
    position: relative;
    display: block;
    color: inherit;
}

.keygen-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,170,.02) 2px, rgba(0,255,170,.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,255,170,.02) 2px, rgba(0,255,170,.02) 4px);
    pointer-events: none;
}

.keygen-page .generator-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.keygen-page .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.98);
}

.keygen-page .card-header {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.keygen-page .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,255,170,0.15) 0%, transparent 70%);
    animation: keygen-pulse 4s ease-in-out infinite;
}

@keyframes keygen-pulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-10%, -10%) scale(1.1); }
}

.keygen-page .card-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.keygen-page .card-header .subtitle {
    margin: 5px 0 0 0;
    opacity: 0.95;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.keygen-page .key-type-option {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.keygen-page .key-type-option:hover {
    border-color: #00b4db;
    background-color: #f0feff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 180, 219, 0.15);
}

.keygen-page .key-type-option input[type="radio"]:checked + label {
    color: #0083b0;
    font-weight: 600;
}

.keygen-page .key-type-option input[type="radio"]:checked ~ .type-description {
    color: #00b4db;
}

.keygen-page .type-description {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.keygen-page .generated-key-box {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    border: 2px solid #00b4db;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 180, 219, 0.1);
}

.keygen-page .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.keygen-page .copy-btn:hover {
    background: linear-gradient(135deg, #0083b0 0%, #005f7f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 219, 0.4);
}

.keygen-page .copy-btn.copied {
    background: #10b981;
}

.keygen-page .length-input {
    max-width: 150px;
}

.keygen-page .btn-generate {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 180, 219, 0.3);
}

.keygen-page .btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 219, 0.5);
    background: linear-gradient(135deg, #0083b0 0%, #005f7f 100%);
}

.keygen-page .btn-generate:active {
    transform: translateY(0);
}

.keygen-page .home-link {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    text-decoration: none;
    background: rgba(0, 180, 219, 0.25);
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 180, 219, 0.4);
    font-weight: 600;
    z-index: 10;
}

.keygen-page .home-link:hover {
    background: rgba(0, 180, 219, 0.4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 219, 0.3);
}

/* =========================================================
   COOKIE CONSENT MODAL
   ========================================================= */

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-modal-panel {
    position: relative;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-modal.active .cookie-modal-panel {
    transform: translateY(0);
}

.cookie-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.cookie-modal-header h3 {
    font-size: 1.4rem;
    color: #f9fafb;
    margin-bottom: 8px;
}

.cookie-modal-header p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.cookie-modal-body {
    padding: 20px 24px;
}

.cookie-category {
    padding: 16px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h4 {
    font-size: 1rem;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.cookie-category-info p {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.toggle-label {
    position: relative;
    width: 48px;
    height: 26px;
    background: #475569;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label {
    background: #22c55e;
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label::after {
    transform: translateX(22px);
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-label {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-status {
    font-size: 0.8rem;
    color: #64748b;
    min-width: 28px;
}

.cookie-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.cookie-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cookie-btn-secondary {
    background: rgba(71, 85, 105, 0.5);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.cookie-btn-secondary:hover {
    background: rgba(71, 85, 105, 0.7);
}

.cookie-btn-primary {
    background: #22c55e;
    color: white;
}

.cookie-btn-primary:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* =========================================================
   COOKIE CONSENT BANNER
   ========================================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-content p {
    flex: 1;
    min-width: 280px;
    font-size: 0.9rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Cookie Consent Mobile */
@media (max-width: 640px) {
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }
}
