/* Light Theme Variables (Default) */
:root {
  --background-color: #ffffff;
  --text-color: #000000;
  --border-color: #cccccc;
  --card-background: #f8f8f8;
  --title-color: #FA627D;
  --output-background: transparent;
  --output-border-color: #e0e0e0;
  --output-shadow: 0 4px 8px rgba(0,0,0,0.07);
}

/* Dark Theme Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #0F172A;
    --text-color: #ffffff;
    --border-color: #4a5568;
    --card-background: #1a2c42;
    --title-color: #FA627D;
    --output-background: transparent;
    --output-border-color: #4a5568;
    --output-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }
}

/* Global Styles */
body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
    color: var(--title-color);
    text-align: center;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

#output {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--output-background);
    border: 1px solid var(--output-border-color);
    border-radius: 10px;
    box-shadow: var(--output-shadow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.policy-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: var(--card-background);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, border-color 0.3s ease, background-color 0.3s ease;
}

.policy-item:hover {
    transform: translateY(-3px);
    /* border-color: var(--hover-border-color);
    background-color: var(--hover-card-background); */
}

.policy-title {
    font-size: 1.3em;
    color: var(--title-color);
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    transition: color 0.3s ease;
}

.policy-description {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0;
    transition: color 0.3s ease;
}

#output p { 
    text-align: center;
    font-style: italic;
    color: var(--text-color);
    padding: 20px;
    transition: color 0.3s ease;
}

/* Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    #output {
        padding: 15px;
    }

    .policy-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .policy-title {
        font-size: 1.1em;
        margin-bottom: 8px;
        padding-bottom: 5px;
    }

    .policy-description {
        font-size: 0.95em;
    }
}
