/**
 * Random Country Generator Plugin Styles
 * Version: 1.0.0
 */

/* Reset and Base Styles */
.rcg-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    line-height: 1.6;
}

.rcg-container *,
.rcg-container *::before,
.rcg-container *::after {
    box-sizing: border-box;
}

/* Theme Selector */
.rcg-theme-selector {
    text-align: right;
    margin-bottom: 20px;
}

.rcg-theme-selector label {
    font-weight: 600;
    margin-right: 10px;
}

.rcg-theme-dropdown {
    padding: 8px 12px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Header Styles */
.rcg-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
}

.rcg-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.rcg-title .rcg-icon {
    font-size: 2.8rem;
}

.rcg-subtitle {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

/* Instructions */
.rcg-instructions {
    text-align: center;
    margin-bottom: 30px;
}

.rcg-instructions p {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

/* Controls */
.rcg-controls {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.rcg-control-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.rcg-region-control,
.rcg-country-control {
    display: flex;
    flex-direction: column;
}

.rcg-region-control label,
.rcg-country-control label {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rcg-select {
    padding: 12px 16px;
    border: 2px solid;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.rcg-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rcg-button-group {
    text-align: center;
}

.rcg-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.rcg-random-button {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.rcg-random-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

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

.rcg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    animation: rcg-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Country Information */
.rcg-country-info {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    animation: rcg-fadeIn 0.6s ease-out;
}

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

.rcg-info-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.rcg-flag-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.rcg-flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rcg-country-title h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.rcg-country-title p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.7;
}

.rcg-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rcg-info-box {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.rcg-info-box:hover {
    transform: translateY(-3px);
}

.rcg-info-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.rcg-info-box p {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* Info Box Colors */
.rcg-population {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}

.rcg-area {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.rcg-capital {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
}

.rcg-languages {
    background: linear-gradient(135deg, #e8f5e8 0%, #a5d6a7 100%);
}

.rcg-currencies {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.rcg-subregion {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
}

/* Download Section */
.rcg-download-section {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.rcg-download-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.rcg-download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Empty State */
.rcg-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.rcg-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.rcg-empty-state h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.rcg-empty-state p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0.8;
}

/* Footer */
.rcg-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
}

.rcg-footer > p {
    font-size: 1.1rem;
    margin: 0 0 20px 0;
}

.rcg-credits {
    font-size: 0.9rem;
    opacity: 0.8;
}

.rcg-credits p {
    margin: 5px 0;
}

.rcg-credits a {
    color: inherit;
    text-decoration: underline;
}

.rcg-credits a:hover {
    text-decoration: none;
}

.rcg-copyright {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.8rem !important;
}

/* =========================
   LIGHT BLUE THEME (Default)
   ========================= */
.rcg-container[data-theme="light"] {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 50%, #cce7ff 100%);
    color: #1e3a8a;
}

.rcg-container[data-theme="light"] .rcg-theme-dropdown {
    border-color: #60a5fa;
    background: rgba(255, 255, 255, 0.9);
    color: #1e3a8a;
    backdrop-filter: blur(10px);
}

.rcg-container[data-theme="light"] .rcg-header {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(147, 197, 253, 0.2) 100%);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.rcg-container[data-theme="light"] .rcg-controls {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(15px);
}

.rcg-container[data-theme="light"] .rcg-select {
    border-color: #60a5fa;
    background: rgba(255, 255, 255, 0.8);
    color: #1e3a8a;
}

.rcg-container[data-theme="light"] .rcg-select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.rcg-container[data-theme="light"] .rcg-country-info {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(15px);
}

.rcg-container[data-theme="light"] .rcg-info-header {
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

.rcg-container[data-theme="light"] .rcg-footer {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(147, 197, 253, 0.15) 100%);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

/* =========================
   LIGHT GREEN THEME
   ========================= */
.rcg-container[data-theme="dark"] {
    background: linear-gradient(135deg, #f0fff4 0%, #e6ffe6 50%, #ccffcc 100%);
    color: #166534;
}

.rcg-container[data-theme="dark"] .rcg-theme-dropdown {
    border-color: #4ade80;
    background: rgba(255, 255, 255, 0.9);
    color: #166534;
    backdrop-filter: blur(10px);
}

.rcg-container[data-theme="dark"] .rcg-header {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(134, 239, 172, 0.2) 100%);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.rcg-container[data-theme="dark"] .rcg-controls {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(74, 222, 128, 0.3);
    backdrop-filter: blur(15px);
}

.rcg-container[data-theme="dark"] .rcg-select {
    border-color: #4ade80;
    background: rgba(255, 255, 255, 0.8);
    color: #166534;
}

.rcg-container[data-theme="dark"] .rcg-select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.rcg-container[data-theme="dark"] .rcg-country-info {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(74, 222, 128, 0.3);
    backdrop-filter: blur(15px);
}

.rcg-container[data-theme="dark"] .rcg-info-header {
    border-bottom: 2px solid rgba(74, 222, 128, 0.3);
}

.rcg-container[data-theme="dark"] .rcg-population {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.rcg-container[data-theme="dark"] .rcg-area {
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
}

.rcg-container[data-theme="dark"] .rcg-capital {
    background: linear-gradient(135deg, #ecfdf5 0%, #a7f3d0 100%);
}

.rcg-container[data-theme="dark"] .rcg-languages {
    background: linear-gradient(135deg, #f7fee7 0%, #d9f99d 100%);
}

.rcg-container[data-theme="dark"] .rcg-currencies {
    background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 100%);
}

.rcg-container[data-theme="dark"] .rcg-subregion {
    background: linear-gradient(135deg, #fefce8 0%, #fde047 100%);
}

.rcg-container[data-theme="dark"] .rcg-footer {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(134, 239, 172, 0.15) 100%);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.rcg-container[data-theme="dark"] .rcg-download-section {
    border-top: 2px solid rgba(74, 222, 128, 0.3);
}

/* =========================
   AQUA GREEN THEME
   ========================= */
.rcg-container[data-theme="fun"] {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 50%, #99f6e4 100%);
    color: #134e4a;
}

.rcg-container[data-theme="fun"] .rcg-theme-dropdown {
    border-color: #2dd4bf;
    background: rgba(255, 255, 255, 0.9);
    color: #134e4a;
    backdrop-filter: blur(10px);
}

.rcg-container[data-theme="fun"] .rcg-header {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.15) 0%, rgba(153, 246, 228, 0.2) 100%);
    border: 1px solid rgba(45, 212, 191, 0.25);
}

.rcg-container[data-theme="fun"] .rcg-controls {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(45, 212, 191, 0.3);
    backdrop-filter: blur(15px);
}

.rcg-container[data-theme="fun"] .rcg-select {
    border-color: #2dd4bf;
    background: rgba(255, 255, 255, 0.8);
    color: #134e4a;
}

.rcg-container[data-theme="fun"] .rcg-select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.rcg-container[data-theme="fun"] .rcg-random-button {
    background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.4);
}

.rcg-container[data-theme="fun"] .rcg-country-info {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(45, 212, 191, 0.3);
    backdrop-filter: blur(15px);
}

.rcg-container[data-theme="fun"] .rcg-info-header {
    border-bottom: 2px solid rgba(45, 212, 191, 0.3);
}

.rcg-container[data-theme="fun"] .rcg-population {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
}

.rcg-container[data-theme="fun"] .rcg-area {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.rcg-container[data-theme="fun"] .rcg-capital {
    background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
}

.rcg-container[data-theme="fun"] .rcg-languages {
    background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 100%);
}

.rcg-container[data-theme="fun"] .rcg-currencies {
    background: linear-gradient(135deg, #fefce8 0%, #fef08a 100%);
}

.rcg-container[data-theme="fun"] .rcg-subregion {
    background: linear-gradient(135deg, #fffbeb 0%, #fed7aa 100%);
}

.rcg-container[data-theme="fun"] .rcg-download-button {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.4);
}

.rcg-container[data-theme="fun"] .rcg-footer {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.1) 0%, rgba(153, 246, 228, 0.15) 100%);
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.rcg-container[data-theme="fun"] .rcg-download-section {
    border-top: 2px solid rgba(45, 212, 191, 0.3);
}

/* =========================
   RESPONSIVE DESIGN
   ========================= */
@media (max-width: 768px) {
    .rcg-container {
        padding: 15px;
    }
    
    .rcg-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .rcg-control-group {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rcg-info-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .rcg-flag-container {
        width: 100px;
        height: 100px;
    }
    
    .rcg-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rcg-country-title h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .rcg-controls {
        padding: 20px;
    }
    
    .rcg-country-info {
        padding: 20px;
    }
    
    .rcg-title {
        font-size: 1.5rem;
    }
    
    .rcg-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}