/* ===== کانتینر اصلی ===== */
.opt-front-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: 'Vazir', 'IRANSans', 'Tahoma', sans-serif;
}

/* ===== کارت اصلی ===== */
.opt-front-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(44, 139, 74, 0.12);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(76, 175, 110, 0.1);
}

.opt-front-card:hover {
    box-shadow: 0 20px 60px rgba(44, 139, 74, 0.18);
}

/* ===== هدر ===== */
.opt-front-header {
    background: linear-gradient(135deg, #1a5a2e 0%, #2e8b4a 50%, #4caf6e 100%);
    padding: 35px 30px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.opt-front-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -30%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

.opt-front-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.opt-front-icon {
    font-size: 48px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.opt-front-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px 0;
    position: relative;
    z-index: 1;
}

.opt-front-desc {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ===== بدنه ===== */
.opt-front-body {
    padding: 30px;
}

/* ===== فیلدها ===== */
.opt-form-group {
    margin-bottom: 20px;
}

.opt-front-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a3a2e;
    margin-bottom: 8px;
}

.opt-label-icon {
    font-size: 16px;
}

.opt-front-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8f0ec;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fdfa;
    color: #1a3a2e;
    box-sizing: border-box;
}

.opt-front-input:focus {
    border-color: #4caf6e;
    box-shadow: 0 0 0 4px rgba(76, 175, 110, 0.1);
    outline: none;
    background: #ffffff;
}

.opt-front-input::placeholder {
    color: #b0c8bb;
}

/* ===== دکمه اصلی ===== */
.opt-front-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4caf6e, #2e8b4a);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.opt-front-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.opt-front-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76, 175, 110, 0.35);
}

.opt-front-btn:hover::before {
    opacity: 1;
}

.opt-front-btn:active {
    transform: scale(0.97);
}

.opt-front-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== اسپینر ===== */
.opt-btn-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: opt-spin 0.8s linear infinite;
}

@keyframes opt-spin {
    to { transform: rotate(360deg); }
}

/* ===== نتیجه ===== */
.opt-front-result {
    margin-top: 20px;
}

.opt-result-success {
    background: #e8f5e9;
    border-radius: 12px;
    padding: 20px;
    border-right: 4px solid #4caf6e;
    animation: opt-slideDown 0.4s ease;
}

.opt-result-error {
    background: #fde8e8;
    border-radius: 12px;
    padding: 16px 20px;
    border-right: 4px solid #ef5350;
    color: #b71c1c;
    font-size: 14px;
    animation: opt-slideDown 0.4s ease;
}

@keyframes opt-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== کارت نتیجه ===== */
.opt-result-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.opt-result-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.opt-result-content {
    flex: 1;
}

.opt-result-label {
    font-size: 13px;
    color: #4a7a5e;
    font-weight: 500;
}

.opt-result-code {
    font-size: 18px;
    font-weight: 700;
    color: #1a5a2e;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    padding: 6px 0;
    word-break: break-all;
}

.opt-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #8ce2a0, #68c885);
    color: #0b3d1f;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.opt-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(104, 200, 133, 0.3);
    color: #0b3d1f;
    text-decoration: none;
}

/* ===== فوتر ===== */
.opt-front-footer {
    padding: 16px 30px;
    background: #f8fdfa;
    border-top: 1px solid #eaf3ef;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #7a9f87;
}

.opt-footer-dot {
    color: #4caf6e;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 480px) {
    .opt-front-header {
        padding: 25px 20px;
    }
    
    .opt-front-title {
        font-size: 18px;
    }
    
    .opt-front-body {
        padding: 20px;
    }
    
    .opt-front-icon {
        font-size: 36px;
    }
    
    .opt-result-card {
        flex-direction: column;
        text-align: center;
    }
    
    .opt-result-code {
        font-size: 15px;
        letter-spacing: 2px;
    }
}

/* ===== حالت دارک (اختیاری) ===== */
@media (prefers-color-scheme: dark) {
    .opt-front-card {
        background: #1a2a22;
        border-color: #2a4a3a;
    }
    
    .opt-front-body {
        background: #1a2a22;
    }
    
    .opt-front-input {
        background: #2a3a32;
        border-color: #3a5a4a;
        color: #e8f0ec;
    }
    
    .opt-front-input:focus {
        background: #1a2a22;
    }
    
    .opt-front-input::placeholder {
        color: #5a7a6a;
    }
    
    .opt-front-label {
        color: #b0d0c0;
    }
    
    .opt-front-footer {
        background: #1a2a22;
        border-top-color: #2a4a3a;
        color: #5a7a6a;
    }
    
    .opt-result-success {
        background: #1a3a2a;
        color: #8ce2a0;
    }
    
    .opt-result-error {
        background: #3a1a1a;
        color: #ef9a9a;
    }
    
    .opt-result-label {
        color: #8ce2a0;
    }
    
    .opt-result-code {
        color: #a8e8b8;
    }
}