:root {
    --background-color: #000;
    --text-color: #fff;
    --border-color: #333;
    --accent-color: #fff;
    --button-bg: #1a1a1a;
    --button-hover-bg: #2a2a2a;
    --input-bg: #1c1c1c;
    --result-bg: #111;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body, button, textarea, input, h1, h2, h3, h4, h5, h6 {
  font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0rem;
}

.tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    opacity: 0.7;
}

.tab-button.active {
    opacity: 1;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

.tab-content.active {
    display: block;
}

textarea {
    width: 100%;
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
    font-size: 0.9rem;
    min-height: 150px;
    resize: vertical;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

button {
    background-color: var(--button-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

button:not(:disabled):hover {
    background-color: var(--button-hover-bg);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-content > button {
    width: 100%;
}

.result-box {
    position: relative;
    margin-top: 1rem;
    background-color: var(--result-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    min-height: 100px;
    text-align: left;
}

.result-box pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: "SF Mono", "Consolas", "Menlo", monospace;
    font-size: 0.9rem;
}

.result-box button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    margin: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background-color: #222;
}

#install-btn {
    margin-bottom: 1.5rem;
    width: 100%;
    padding: 0.8rem;
    font-weight: 600;
    background: #fff;
    color: #000;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

/* iOS instructions */
.ios-instructions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1c1c1e;
    border-top: 1px solid var(--border-color);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    z-index: 10000;
    animation: slideUp 0.5s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ios-instructions__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ios-instructions__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.ios-instructions__close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
}

.ios-instructions__steps {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.ios-instructions__step {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.ios-instructions__step-number {
    background: rgb(52, 52, 52);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ios-instructions__icon {
    display: inline-flex;
    vertical-align: middle;
    color: white;
}

.ios-instructions[hidden] {
    display: none !important;
}