/**
 * Random Decision Maker Tool - Modern Playful Styles
 */

.random-decision-maker-tool {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header Styles */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

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

.tool-header h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.tool-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Tool Selector Tabs */
.tool-selector {
    margin-bottom: 2rem;
}

.tool-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

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

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

.tab-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.tab-icon {
    font-size: 1.5rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

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

.tab-btn.active .tab-icon {
    animation: spin 1s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Decision Container */
.decision-container {
    position: relative;
}

.tool-section {
    animation: fadeIn 0.5s ease-in;
}

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

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 968px) {
    .section-grid {
        grid-template-columns: 1fr;
    }
}

/* Input Panel */
.input-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.panel-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: #667eea;
}

.panel-header {
    margin-bottom: 1rem;
}

.panel-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: scale(1.01);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.template-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: #555;
    position: relative;
    overflow: hidden;
}

.template-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.template-btn:hover::after {
    width: 300px;
    height: 300px;
}

.template-btn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.template-icon {
    font-size: 2rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.template-btn:hover .template-icon {
    transform: scale(1.2) rotate(10deg);
}

.template-label {
    font-size: 0.9rem;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-spin, .btn-flip {
    font-size: 1.2rem;
    padding: 1.25rem 2.5rem;
    animation: pulse-button 2s ease-in-out infinite;
}

@keyframes pulse-button {
    0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.7); }
}

.btn-icon {
    font-size: 1.3rem;
    display: inline-block;
}

.wheel-controls, .coin-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Display Panel */
.display-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-display-card, .coin-display-card {
    width: 100%;
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 2px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.wheel-display-card::before, .coin-display-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

/* Wheel Container */
.wheel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    padding: 2rem;
}

#decision-wheel {
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transition: transform 0.1s linear;
    background: white;
    border: 8px solid #667eea;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff6b6b;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    z-index: 10;
    animation: point-bounce 1s ease-in-out infinite;
}

@keyframes point-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* Coin Container */
.coin-container {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    margin: 2rem 0;
    padding: 2rem;
}

.coin {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 8px solid #f0f0f0;
    overflow: hidden;
    box-sizing: border-box;
}

.coin-heads {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotateY(0deg);
}

.coin-tails {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: rotateY(180deg);
}

.coin-content {
    text-align: center;
    color: white;
}

.coin-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    display: block;
}

.coin-text {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Result Display */
.wheel-result, .coin-result {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: result-appear 0.5s ease-out;
}

@keyframes result-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.result-celebration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #667eea;
    animation: confetti-fall 3s ease-out infinite;
}

.confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background: #ff6b6b;
}

.confetti:nth-child(2) {
    left: 30%;
    animation-delay: 0.5s;
    background: #4ecdc4;
}

.confetti:nth-child(3) {
    left: 50%;
    animation-delay: 1s;
    background: #ffe66d;
}

.confetti:nth-child(4) {
    left: 70%;
    animation-delay: 1.5s;
    background: #95e1d3;
}

.confetti:nth-child(5) {
    left: 90%;
    animation-delay: 2s;
    background: #f38181;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

.result-display {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    animation: result-glow 2s ease-in-out infinite;
}

@keyframes result-glow {
    0%, 100% { text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3); }
    50% { text-shadow: 0 2px 20px rgba(102, 126, 234, 0.6); }
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Coin Options */
.coin-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.label-icon {
    font-size: 1.2rem;
}

/* History Section */
.history-section {
    margin-top: 3rem;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
}

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

.history-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.clear-history-btn {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.clear-history-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
}

.history-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.history-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-tab:hover {
    color: #667eea;
}

.history-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.history-content {
    min-height: 200px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-history {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-history svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-result {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.history-options {
    color: #666;
    font-size: 0.9rem;
}

.history-meta {
    margin-top: 0.5rem;
}

.history-time {
    font-size: 0.85rem;
    color: #999;
}

/* Status Messages */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #667eea;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.status-success {
    border-left-color: #4ecdc4;
}

.status-info {
    border-left-color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header h3 {
        font-size: 2rem;
    }
    
    .section-grid {
        grid-template-columns: 1fr;
    }
    
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .coin {
        width: 150px;
        height: 150px;
    }
    
    .coin-icon {
        font-size: 3rem;
    }
    
    .coin-text {
        font-size: 1.2rem;
    }
    
    .wheel-controls, .coin-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading States */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}



