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

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 100%);
    color: white;
        font-family: Vazirmatn, sans-serif;

}

.hidden { display: none !important; }

/* ===== Center Page (index, not_found) ===== */
.center-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===== Logo & Titles ===== */
.logo {
    font-size: 3rem;
    margin-bottom: 10px;
}

h1.gradient-text {
    font-size: 2.5rem;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #ff0055, #ff9900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.hint {
    color: #aaa;
    font-size: 0.9rem;
}

/* ===== Box ===== */
.box {
    direction: ltr;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

/* ===== Input ===== */
.input-wrapper {
    
    position: relative;
    margin: 25px 0;
}

.input-wrapper input {
    width: 100%;
    padding: 18px 20px;
    padding-right: 130px;
    border-radius: 14px;
    border: 2px solid #222;
    background: #111;
    color: white;
    font-size: 1.2rem;
    outline: none;
    direction: ltr;
    text-align: left;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: #ff0055;
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.2);
}

.input-wrapper input::placeholder {
    color: #444;
}

.input-suffix {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
    direction: ltr;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #ff0055 0%, #ff4400 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 14px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 0, 85, 0.3);
}

.btn-secondary {
    background: #333;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: #444;
}

/* ===== Error ===== */
.error-msg {
    color: #ff3333;
    font-size: 0.9rem;
    margin-top: 15px;
    min-height: 25px;
}

/* ===== Success Box ===== */
.success-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.divider {
    border-top: 1px solid #333;
    margin: 25px 0;
}

.link-section {
    text-align: center;
    margin: 15px 0;
}

.link-label {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.link-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 12px;
    margin: 10px 0;
}

.link-url {
    color: #33ff88;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
    cursor: pointer;
    transition: 0.2s;
}

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

.warning-section {
    background: rgba(255, 200, 0, 0.05);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 200, 0, 0.2);
}

.warning-text { color: #ffcc00 !important; }
.warning-box { background: rgba(255, 200, 0, 0.1) !important; }
.warning-link { color: #ffcc00 !important; }
.warning-note {
    color: #ffcc00;
    font-size: 0.8rem;
    margin-top: 15px;
}

/* ===== Credit ===== */
.credit {
    position: fixed;
    bottom: 15px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    direction: ltr;
}

.credit a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.credit a:hover {
    color: #ff0055;
}

/* ===== Control Page ===== */
.control-page {
    padding: 20px;
    padding-bottom: 100px;
}

.header {
    text-align: center;
    padding: 20px 0 30px;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff0055, #ff4400);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 10px;
}

.current-vibe {
    text-align: center;
    margin: 20px 0;
}

.current-emoji {
    font-size: 4rem;
    display: block;
    margin: 10px 0;
}

.emoji-category {
    margin: 25px 0;
}

.category-title {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 12px;
    text-align: center;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.emoji-btn {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.1);
}

.custom-section {
    max-width: 400px;
    margin: 30px auto 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
}

.custom-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.custom-input {
    flex: 1;
    font-size: 2.5rem;
    text-align: center;
    background: #111;
    border: 2px solid #333;
    color: white;
    border-radius: 14px;
    padding: 15px;
    outline: none;
}

.custom-input:focus {
    border-color: #ff0055;
}

.send-btn {
    background: linear-gradient(135deg, #ff0055, #ff4400);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 14px;
    font-size: 1.5rem;
    cursor: pointer;
}

.send-btn:active {
    transform: scale(0.95);
}

/* Toast */
#toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #33ff88, #00cc66);
    color: black;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(51, 255, 136, 0.3);
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Vibe Page ===== */
.vibe-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0a0a0a;
    transition: background-color 1.5s;
    overflow: hidden;
    perspective: 1000px;
    cursor: crosshair;
}

#weather-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#neon-glow {
    position: absolute;
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    transition: background 1s, transform 0.2s;
    z-index: 2;
}

#vibe-container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

#vibe-image {
    width: 250px;
    height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
    transition: transform 0.1s;
    user-select: none;
    -webkit-user-drag: none;
}

#vibe-text {
    font-size: 12rem;
    text-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    user-select: none;
    line-height: 1;
}

.fresh-pulse {
    animation: heartbeat 0.8s ease-in-out infinite, floatFresh 2s ease-in-out infinite;
}

.calm-float {
    animation: floatCalm 4s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes floatFresh {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatCalm {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.ripple {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: rippleEffect 0.8s forwards;
    pointer-events: none;
    z-index: 5;
}

@keyframes rippleEffect {
    0% { width: 250px; height: 250px; opacity: 1; }
    100% { width: 600px; height: 600px; opacity: 0; }
}

.lightning-flash {
    animation: flash 0.15s;
}

@keyframes flash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(3); background-color: rgba(255, 255, 255, 0.1); }
}

#hint {
position: absolute;
    bottom: 25px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    letter-spacing: 4px;
    pointer-events: none;
    z-index: 20;
    font-family: monospace;
}

/* ===== Not Found Page ===== */
.not-found {
    text-align: center;
}

.not-found-icon {
    font-size: 6rem;
    margin-bottom: 20px;
}

.not-found h2 {
    color: #888;
    font-weight: normal;
    margin-bottom: 30px;
}

.home-link {
    color: #ff0055;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 15px 30px;
    border: 2px solid #ff0055;
    border-radius: 12px;
    transition: 0.3s;
    display: inline-block;
}

.home-link:hover {
    background: #ff0055;
    color: white;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .box {
        padding: 25px;
    }
    
    h1.gradient-text {
        font-size: 2rem;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .emoji-btn {
        font-size: 1.8rem;
    }
    
    #vibe-image {
        width: 200px;
        height: 200px;
    }
    
    #vibe-text {
        font-size: 8rem;
    }
}