@font-face {
    font-family: vazir;
    src: url(Vazir.ttf);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'vazir', sans-serif;
}

body {
    background: linear-gradient(135deg, #4c1d95, #7c3aed);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    direction: rtl;
    color: #1f2937;
}

.container {
    max-width: 580px;
    width: 100%;
    background: #f8fafc;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-top: 20px;
}

header {
    background: #ffffff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

h1 {
    font-size: 1.9rem;
    color: #7c3aed;
    font-weight: 700;
}

nav {
    display: flex;
    align-items: center;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #a78bfa;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.nav-button:hover {
    background: #8b5cf6;
    transform: scale(1.03);
}

main {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-bubble.intro {
    background: #e9d5ff;
    color: #6d28d9;
    padding: 15px 20px;
    border-radius: 18px 18px 18px 4px;
    font-size: 0.95rem;
    position: relative;
    max-width: 80%;
    margin: 0 auto;
    animation: slideIn 0.6s ease-out;
}

.chat-bubble::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 15px;
    border: 8px solid transparent;
    border-top-color: #e9d5ff;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.7s ease-out;
}

textarea, input[type="password"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 1rem;
    background: #f9fafb;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus, input[type="password"]:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 130px;
}

.action-button, .copy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.action-button {
    background: linear-gradient(to right, #a78bfa, #7c3aed);
    color: #ffffff;
}

.action-button:hover {
    background: linear-gradient(to right, #8b5cf6, #6d28d9);
    transform: scale(1.03);
}

.copy-button {
    background: linear-gradient(to right, #34d399, #10b981);
    color: #ffffff;
}

.copy-button:hover {
    background: linear-gradient(to right, #10b981, #059669);
    transform: scale(1.03);
}

.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    animation: shake 0.3s ease;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}


.about{
    margin: 50px 0px;
    text-align: center;
}

.about p{
    padding: 20px 0px;
}

.download-button {
    gap: 8px;
    background: #219bff;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.download-button:hover {
    background: #5ccdf6;
    transform: scale(1.03);
}

.about-link {
    text-align: center;
}

.about-link a{
    color: darkorange;
    text-decoration: none;
}

.about-link a:visited{
    color: darkorange;
    text-decoration: none;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
    }

    header {
        padding: 15px 20px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .nav-button {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .chat-bubble.intro {
        font-size: 0.9rem;
        padding: 12px 15px;
    }

    .message-form {
        padding: 15px;
    }

    textarea, input[type="password"], .action-button, .copy-button {
        font-size: 0.95rem;
    }

    .icon {
        width: 18px;
        height: 18px;
    }
}