/* PALM READING AI STYLES */
.palm-reading-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(128, 0, 0, 0.1);
}

/* Header */
.pra-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #800000, #a52a2a);
    color: white;
}

.pra-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.pra-header h1 {
    font-size: 32px;
    color: #ffffff !important;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.pra-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

/* Upload Box */
.pra-upload-box {
    padding: 30px;
}

.upload-step {
    text-align: center;
    margin-bottom: 30px;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #800000;
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 10px;
}

.upload-step h3 {
    font-size: 24px;
    color: #800000;
    margin: 0 0 5px 0;
}

.upload-step p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* File Upload */
.file-input {
    display: none;
}

.upload-label {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #fff5f5;
    border: 2px dashed #e6b8b8;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 20px 0;
    text-align: left;
}

.upload-label:hover {
    background: #fff0f0;
    border-color: #800000;
    transform: translateY(-2px);
}

.upload-label.dragover {
    background: #fff0f0;
    border-color: #800000;
}

.upload-icon {
    font-size: 40px;
    color: #800000;
    flex-shrink: 0;
}

.upload-text {
    flex: 1;
}

.main-text {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #800000;
    margin-bottom: 5px;
}

.sub-text {
    display: block;
    font-size: 14px;
    color: #666;
}

/* Image Preview */
.image-preview {
    display: none;
    background: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid #e6b8b8;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #800000;
    color: white;
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.remove-btn:hover {
    opacity: 0.8;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
    padding: 20px;
    max-height: 300px;
    object-fit: contain;
}

/* Hand Selection */
.hand-selection {
    background: #fff5f5;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.hand-selection h4 {
    color: #800000;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.hand-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .hand-options {
        grid-template-columns: 1fr;
    }
}

.hand-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border: 2px solid #e6b8b8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.hand-option:hover {
    border-color: #800000;
    background: #fff0f0;
}

.hand-option input[type="radio"] {
    display: none;
}

.radio-btn {
    width: 20px;
    height: 20px;
    border: 2px solid #800000;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.hand-option input[type="radio"]:checked + .radio-btn {
    background: #800000;
}

.hand-option input[type="radio"]:checked + .radio-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.hand-info {
    display: flex;
    flex-direction: column;
}

.hand-name {
    font-weight: 600;
    color: #800000;
    font-size: 16px;
}

.hand-desc {
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

/* Analyze Button */
.analyze-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #800000, #a52a2a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.analyze-btn:hover:not(.loading) {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(128, 0, 0, 0.2);
}

.analyze-btn:active:not(.loading) {
    transform: translateY(-1px);
}

.analyze-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-loading {
    display: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Privacy */
.privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: #e8f5e8;
    border-radius: 8px;
    color: #2d5a2d;
    font-size: 14px;
}

.lock {
    font-size: 16px;
}

/* Tips */
.tips-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e6b8b8;
}

.tips-section h4 {
    color: #800000;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fff5f5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.tip-icon {
    font-size: 18px;
}

/* Results Section */
.pra-results-section {
    display: none;
    padding: 30px;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h2 {
    font-size: 28px;
    color: #800000;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.meta-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 14px;
    color: #666;
}

@media (max-width: 768px) {
    .meta-info {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

.meta-item {
    background: #fff5f5;
    padding: 8px 15px;
    border-radius: 20px;
}

/* Loading */
.loading-section {
    text-align: center;
    padding: 40px 20px;
}

.loading-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.spinner-large {
    width: 100px;
    height: 100px;
    border: 3px solid #e6b8b8;
    border-top-color: #800000;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: #800000;
    border-radius: 50%;
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.loading-section h3 {
    color: #800000;
    margin: 0 0 10px 0;
    font-size: 24px;
}

.loading-section p {
    color: #666;
    margin: 0 0 30px 0;
    font-size: 16px;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .steps {
        flex-direction: column;
        gap: 20px;
    }
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-icon {
    width: 30px;
    height: 30px;
    border: 2px solid #e6b8b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.step.completed .step-icon {
    background: #800000;
    color: white;
    border-color: #800000;
}

.step.active .step-icon {
    border-color: #800000;
    animation: pulse 1.5s ease-in-out infinite;
}

.step span:last-child {
    font-size: 14px;
    color: #666;
}

/* Results Content */
.results-content {
    display: none;
}

.result-card {
    background: #fff5f5;
    border-left: 4px solid #800000;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(128, 0, 0, 0.1);
}

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

.result-title {
    font-size: 20px;
    color: #800000;
    font-weight: 600;
    margin: 0;
}

.result-score {
    background: #800000;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}

.result-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px;
}

.traits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trait {
    background: white;
    color: #800000;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e6b8b8;
}

/* Predictions */
.predictions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.prediction-card {
    background: white;
    border: 1px solid #e6b8b8;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.prediction-card:hover {
    border-color: #800000;
    transform: translateY(-2px);
}

.prediction-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.prediction-area {
    font-weight: 600;
    color: #800000;
    margin-bottom: 5px;
    font-size: 16px;
}

.prediction-text {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* Overall Reading */
.overall-reading {
    background: linear-gradient(135deg, #800000, #a52a2a);
    color: white;
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
}

.overall-reading h3 {
    font-size: 20px;
    color: #ffffff !important;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.overall-reading p {
    margin: 0;
    line-height: 1.7;
    opacity: 0.95;
}

/* Actions */
.results-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .results-actions {
        flex-direction: column;
    }
}

.action-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.new-btn {
    background: #fff5f5;
    color: #800000;
    border: 2px solid #e6b8b8;
}

.new-btn:hover {
    background: #fff0f0;
    border-color: #800000;
    transform: translateY(-2px);
}

.share-btn {
    background: linear-gradient(135deg, #800000, #a52a2a);
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(128, 0, 0, 0.2);
}

.btn-icon {
    font-size: 18px;
}

/* Disclaimer */
.disclaimer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 25px;
}

.disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

/* Progress Bars */
.progress-container {
    margin: 10px 0 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a52a2a, #800000);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .palm-reading-app {
        margin: 20px;
        border-radius: 15px;
    }
    
    .pra-header {
        padding: 30px 15px;
    }
    
    .pra-header h1 {
        font-size: 26px;
    }
    
    .pra-subtitle {
        font-size: 16px;
    }
    
    .pra-upload-box {
        padding: 20px;
    }
    
    .upload-step h3 {
        font-size: 22px;
    }
    
    .analyze-btn {
        padding: 15px;
        font-size: 16px;
    }
    
    .results-header h2 {
        font-size: 24px;
    }
    
    .loading-section h3 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .pra-header h1 {
        font-size: 22px;
    }
    
    .pra-icon {
        font-size: 40px;
    }
    
    .upload-label {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .upload-text {
        text-align: center;
    }
    
    .main-text {
        font-size: 16px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .tip {
        justify-content: center;
    }
}