@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  /* Neo-Brutalist Color Palette */
  --color-bg-main: #f0f0f0;
  --color-primary: #FFD700; /* Vibrant Yellow */
  --color-secondary: #000000;
  --color-accent-1: #FF3366; /* Pink/Red for Roast */
  --color-accent-2: #33CCFF; /* Cyan for Witty */
  --color-accent-3: #9933FF; /* Purple for Sarcastic */
  --color-white: #FFFFFF;
  --color-text-main: #000000;
  --color-text-muted: #555555;

  /* Borders and Shadows */
  --border-thick: 4px solid #000000;
  --border-radius-md: 12px;
  --shadow-brutal: 6px 6px 0px 0px #000000;
  --shadow-brutal-hover: 2px 2px 0px 0px #000000;

  /* Typography */
  --font-main: 'Space Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    line-height: 1.6;
    padding: 2rem;
}

.brutal-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.brutal-header {
    text-align: center;
    margin-bottom: 3rem;
    background: var(--color-primary);
    border: var(--border-thick);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-brutal);
}

.brutal-title {
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.brutal-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Sections */
.brutal-section {
    margin-bottom: 3rem;
}

.brutal-heading {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

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

.brutal-btn {
    background-color: var(--color-white);
    border: var(--border-thick);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-brutal);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.brutal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    z-index: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.brutal-btn:hover {
    transform: translate(4px, 4px);
    box-shadow: var(--shadow-brutal-hover);
}

.brutal-btn:hover::before {
    transform: translateY(0);
}

.brutal-btn.active {
    background-color: var(--accent-color);
    transform: translate(4px, 4px);
    box-shadow: var(--shadow-brutal-hover);
}

.brutal-btn > * {
    position: relative;
    z-index: 1;
}

.personality-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Upload Area */
.brutal-card {
    background: var(--color-white);
    border: var(--border-thick);
    border-radius: var(--border-radius-md);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-brutal);
}

.upload-area {
    cursor: pointer;
    border: 4px dashed #000;
    transition: all 0.2s;
}

.upload-area:hover, .upload-area.dragover {
    background-color: #f8f8f8;
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-brutal-hover);
}

.brutal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 4rem;
    background: var(--color-white);
    border: var(--border-thick);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-brutal);
}

.brutal-spinner {
    width: 60px;
    height: 60px;
    border: 8px solid var(--color-bg-main);
    border-top: 8px solid var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

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

.brutal-loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

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

/* Results Section */
.score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.brutal-gauge {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
}

.score-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.brutal-score {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.brutal-box {
    background: var(--color-bg-main);
    border: var(--border-thick);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 2rem;
}

.brutal-text {
    font-size: 1.2rem;
    font-weight: 600;
}

.brutal-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.brutal-box-small {
    background: var(--color-bg-main);
    border: 2px solid #000;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

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

.brutal-action-btn {
    font-family: var(--font-main);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 2rem;
    border: var(--border-thick);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-brutal);
    transition: all 0.2s;
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.brutal-action-btn:hover {
    transform: translate(4px, 4px);
    box-shadow: var(--shadow-brutal-hover);
}

.btn--secondary.brutal-action-btn {
    background-color: var(--color-white);
}

/* History */
.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #000;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--color-bg-main);
}

.history-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #000;
}

.history-details h4 {
    margin: 0;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    z-index: 1001;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-white);
}

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

.brutal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    font-weight: bold;
}
