/* CSS Variables - Islamic Color Theme */
:root {
    --primary-dark: #1B4D3E;      /* Deep Islamic Green */
    --primary-medium: #2C5F4A;    /* Medium Islamic Green */
    --primary-light: #4A7C6B;     /* Light Islamic Green */
    --accent-gold: #C9A84A;        /* Islamic Gold */
    --accent-gold-light: #E5C87B;  /* Light Gold */
    --accent-blue: #2C5F7C;        /* Islamic Blue */
    --accent-blue-light: #4A7F9C;  /* Light Blue */
    --text-dark: #2D3E3A;
    --text-light: #5D6E6A;
    --white: #FFFFFF;
    --off-white: #F9F7F4;
    --shadow: rgba(0, 50, 30, 0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
    --gradient-gold: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    --gradient-blue: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
}

/* Main Container */
.rwh-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Card Design */
.rwh-card {
    background: var(--white);
    border-radius: 30px;
    box-shadow: 0 20px 40px var(--shadow);
    overflow: hidden;
    position: relative;
    animation: cardGlow 3s infinite ease-in-out;
}

@keyframes cardGlow {
    0%, 100% { box-shadow: 0 20px 40px var(--shadow); }
    50% { box-shadow: 0 25px 50px rgba(201, 168, 74, 0.3); }
}

/* Header Section */
.rwh-header {
    background: var(--gradient-primary);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rwh-header::before {
    content: '✨🌙✨';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-size: 24px;
    opacity: 0.2;
    animation: starsMove 20s linear infinite;
}

@keyframes starsMove {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.rwh-header-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: floatIcon 3s ease-in-out infinite;
}

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

.rwh-header h2 {
    color: var(--white);
    font-size: 32px;
    margin: 10px 0;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.rwh-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

/* Form Section */
.rwh-form {
    padding: 40px;
    background: var(--off-white);
}

.rwh-form-group {
    margin-bottom: 25px;
}

.rwh-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 16px;
}

.label-icon {
    margin-right: 8px;
    font-size: 18px;
}

.rwh-input,
.rwh-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid transparent;
    border-radius: 15px;
    font-size: 16px;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--shadow);
}

.rwh-input:focus,
.rwh-select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 8px 12px var(--shadow);
    transform: translateY(-2px);
}

/* Checkbox Group */
.rwh-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
}

.rwh-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-dark);
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.rwh-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    position: absolute;
    left: 0;
    height: 24px;
    width: 24px;
    background: var(--white);
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.rwh-checkbox-label:hover .checkbox-custom {
    border-color: var(--accent-gold);
    transform: scale(1.1);
}

.rwh-checkbox-label input:checked ~ .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--primary-dark);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.rwh-checkbox-label input:checked ~ .checkbox-custom::after {
    display: block;
}

/* Button Styles */
.rwh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 30px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.rwh-btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(27, 77, 62, 0.3);
}

.rwh-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.rwh-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(27, 77, 62, 0.4);
}

.rwh-btn-primary:hover::before {
    left: 100%;
}

.btn-icon {
    font-size: 24px;
    animation: iconSpin 4s linear infinite;
}

@keyframes iconSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.rwh-btn.loading .btn-text {
    opacity: 0.7;
}

.rwh-btn.loading .btn-loader {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Section */
.rwh-result-section {
    padding: 40px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(249,247,244,0.95));
    border-top: 3px solid var(--accent-gold);
    animation: slideUp 0.5s ease-out;
}

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-title {
    color: var(--primary-dark);
    font-size: 24px;
    margin: 0;
    position: relative;
    display: inline-block;
}

.result-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.rwh-icon-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-dark);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px var(--shadow);
}

.rwh-icon-btn:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: rotate(360deg);
}

/* Result Content */
.result-content {
    margin: 30px 0;
}

.result-item {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 20px;
    animation: fadeInItem 0.5s ease-out forwards;
    opacity: 0;
}

.result-item:nth-child(1) { animation-delay: 0.1s; }
.result-item:nth-child(2) { animation-delay: 0.3s; }
.result-item:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-item.wishes {
    background: linear-gradient(135deg, rgba(201, 168, 74, 0.1), rgba(229, 200, 123, 0.1));
    border-left: 5px solid var(--accent-gold);
}

.result-item.hadith {
    background: linear-gradient(135deg, rgba(44, 95, 124, 0.1), rgba(74, 127, 156, 0.1));
    border-left: 5px solid var(--accent-blue);
}

.result-item.tips {
    background: linear-gradient(135deg, rgba(27, 77, 62, 0.1), rgba(74, 124, 107, 0.1));
    border-left: 5px solid var(--primary-dark);
}

.item-icon {
    font-size: 30px;
    margin-right: 15px;
    animation: shine 2s infinite;
}

@keyframes shine {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.item-content {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Share Section */
.share-section {
    margin-top: 30px;
    text-align: center;
}

.share-title {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 16px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px var(--shadow);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px var(--shadow);
}

.share-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.share-facebook {
    background: linear-gradient(135deg, #3b5998, #2d4373);
}

.share-twitter {
    background: linear-gradient(135deg, #1DA1F2, #0d8ecf);
}

.share-icon {
    font-size: 20px;
}

/* Footer */
.rwh-footer {
    background: var(--gradient-primary);
    padding: 20px;
    text-align: center;
    color: var(--white);
}

.footer-text {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.moon-stars {
    margin-top: 5px;
    font-size: 20px;
}

.moon {
    display: inline-block;
    animation: moonGlow 3s infinite;
}

@keyframes moonGlow {
    0%, 100% { filter: drop-shadow(0 0 5px var(--accent-gold)); }
    50% { filter: drop-shadow(0 0 20px var(--accent-gold-light)); }
}

.stars {
    display: inline-block;
    animation: starsTwinkle 1.5s infinite;
}

@keyframes starsTwinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .rwh-container {
        margin: 20px auto;
        padding: 10px;
    }
    
    .rwh-header h2 {
        font-size: 24px;
    }
    
    .rwh-form,
    .rwh-result-section {
        padding: 25px;
    }
    
    .rwh-checkbox-group {
        gap: 15px;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .result-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .rwh-header {
        padding: 30px 20px;
    }
    
    .rwh-header-icon {
        font-size: 40px;
    }
    
    .rwh-btn {
        font-size: 16px;
        padding: 15px 20px;
    }
    
    .item-content {
        font-size: 16px;
    }
}