:root {
    --primary-blue: #4A90E2;
    --success-green: #7ED321;
    --warning-amber: #F5A623;
    --error-red: #D0021B;
    --accent-purple: #9013FE;
    --background-light: #F8F9FA;
    --background-dark: #FFFFFF;
    --background-card: #FAFBFC;
    --background-hover: #F0F2F5;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --text-muted: #95A5A6;
    --border-color: #E8ECF0;
    --border-light: #F1F3F4;
    --shadow-light: 0 2px 8px rgba(74, 144, 226, 0.08);
    --shadow-medium: 0 4px 16px rgba(74, 144, 226, 0.12);
    --shadow-hover: 0 8px 24px rgba(74, 144, 226, 0.16);
    --border-radius: 16px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    color: var(--text-primary);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-light);
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.language-toggle {
    background: var(--background-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
}

.language-toggle:hover {
    background: var(--background-hover);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

/* Main Content */
.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

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

/* Home Section */
.welcome-card {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple));
}

.welcome-card h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
}

.welcome-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

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

.action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-blue), #5BA0F0);
    color: white;
    border: none;
    box-shadow: var(--shadow-light);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #3A7BC8, var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.action-btn.secondary {
    background: var(--background-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.action-btn.secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--background-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

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

.stat-card {
    background: var(--background-card);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

.stat-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Write Section */
.write-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.poem-editor {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.editor-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#poemTitle {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    background: var(--background-dark);
    color: var(--text-primary);
}

#poemTitle:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.editor-tools {
    display: flex;
    gap: 0.5rem;
}

.tool-btn {
    padding: 0.75rem;
    border: none;
    background: var(--background-hover);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.tool-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

#poemContent {
    width: 100%;
    min-height: 400px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    resize: vertical;
    transition: var(--transition);
    background: var(--background-dark);
    color: var(--text-primary);
}

#poemContent:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.poem-analysis {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--background-hover);
    border-radius: var(--border-radius-small);
    border-left: 4px solid var(--primary-blue);
    border: 1px solid var(--border-light);
}

.poem-analysis h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.suggestions-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rhyme-suggestions, .meter-analysis {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.rhyme-suggestions h3, .meter-analysis h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.current-word {
    padding: 1rem;
    background: var(--background-hover);
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.rhyme-list {
    max-height: 200px;
    overflow-y: auto;
}

.rhyme-item {
    padding: 0.75rem;
    margin: 0.25rem 0;
    background: var(--background-hover);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.rhyme-item:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateX(2px);
    box-shadow: var(--shadow-light);
}

.rhyme-score {
    font-size: 0.8rem;
    opacity: 0.7;
}

.meter-display {
    font-family: 'Courier New', monospace;
    background: var(--background-hover);
    padding: 1rem;
    border-radius: var(--border-radius-small);
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.no-suggestions {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Templates Section */
.templates-container h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
}

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

.template-card {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-purple));
    opacity: 0;
    transition: var(--transition);
}

.template-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

.template-card:hover::before {
    opacity: 1;
}

.template-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.template-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.template-info {
    background: var(--background-hover);
    padding: 0.75rem;
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.use-template-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-blue), #5BA0F0);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.use-template-btn:hover {
    background: linear-gradient(135deg, #3A7BC8, var(--primary-blue));
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.template-preview {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-hover);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid var(--border-light);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.preview-header h3 {
    color: var(--text-primary);
    font-weight: 600;
}

.close-preview {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-preview:hover {
    color: var(--error-red);
}

.preview-content {
    margin-bottom: 2rem;
    font-family: 'Georgia', serif;
    line-height: 1.8;
}

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

/* Poems Section */
.poems-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.poems-header h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
}

.poems-actions {
    display: flex;
    gap: 0.5rem;
}

.search-bar {
    background: var(--background-card);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

#poemSearch {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    background: var(--background-dark);
    color: var(--text-primary);
}

#poemSearch:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.search-close:hover {
    color: var(--error-red);
}

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

.poem-item {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.poem-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

.poem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.poem-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.poem-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.poem-actions {
    display: flex;
    gap: 0.5rem;
}

.poem-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.poem-action:hover {
    background: var(--background-light);
    color: var(--primary-blue);
}

.poem-content-preview {
    color: var(--text-primary);
    font-family: 'Georgia', serif;
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.poem-content-preview.expanded {
    max-height: none;
}

.poem-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Community Section */
.community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.community-header h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
}

.community-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.community-poem {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.community-poem:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

.poem-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.poem-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.community-poem-content {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.poem-interactions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.interaction-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.interaction-btn:hover {
    background: var(--background-light);
    color: var(--primary-blue);
}

.interaction-btn.liked {
    color: var(--error-red);
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Modal Styles */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--background-card);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-hover);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--error-red);
}

.modal-body {
    padding: 1.5rem;
}

#poemSelect {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    font-size: 1rem;
    background: var(--background-dark);
    color: var(--text-primary);
}

#poemSelect:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}



/* FAQ Section Styles */
.faq-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--background-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.faq-header h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.faq-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.faq-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.faq-category {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.faq-category h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-category h3 i {
    color: var(--primary-blue);
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 0;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-blue);
    background: var(--background-hover);
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: var(--transition);
    color: var(--text-secondary);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    color: var(--primary-blue);
}

.faq-answer {
    padding: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
    animation: fadeIn 0.3s ease-in;
}

.contact-section {
    background: var(--background-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    margin-top: 3rem;
}

.contact-section h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-link {
    background: linear-gradient(135deg, var(--primary-blue), #5BA0F0);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link:hover {
    background: linear-gradient(135deg, #3A7BC8, var(--primary-blue));
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

@media (max-width: 768px) {
    .faq-categories {
        grid-template-columns: 1fr;
    }
    
    .faq-header h2 {
        font-size: 2rem;
    }
    
    .faq-category {
        padding: 1.5rem;
    }
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-blue), #5BA0F0);
    color: white;
    border: none;
    box-shadow: var(--shadow-light);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #3A7BC8, var(--primary-blue));
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn.secondary {
    background: var(--background-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.btn.secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--background-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn.success {
    background: var(--success-green);
    color: white;
}

.btn.success:hover {
    background: #388E3C;
}

.btn.warning {
    background: var(--warning-amber);
    color: var(--text-primary);
}

.btn.warning:hover {
    background: #F57C00;
}

.btn.danger {
    background: var(--error-red);
    color: white;
}

.btn.danger:hover {
    background: #D32F2F;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background-card);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
    box-shadow: 0 -4px 16px rgba(74, 144, 226, 0.08);
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 8px;
    min-width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.8rem;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-blue);
    background: var(--background-hover);
    transform: translateY(-1px);
}

/* Footer */
footer {
    background: var(--background-card);
    color: var(--text-secondary);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-light);
}

footer a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

footer a:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-main {
        padding: 1rem 0.5rem;
    }
    
    .write-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .poems-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .poems-actions {
        justify-content: center;
    }
    
    .community-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .template-preview {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .poem-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .poem-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.2rem;
    }
    
    .welcome-card {
        padding: 1.5rem;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .poem-editor, .rhyme-suggestions, .meter-analysis {
        padding: 1rem;
    }
    
    .nav-item span {
        font-size: 0.7rem;
    }
    
    .nav-item i {
        font-size: 1.1rem;
    }
}

/* Light mode enhancements */
@media (prefers-color-scheme: light) {
    :root {
        --background-light: #F8F9FA;
        --background-dark: #FFFFFF;
        --background-card: #FAFBFC;
        --background-hover: #F0F2F5;
        --text-primary: #2C3E50;
        --text-secondary: #7F8C8D;
        --text-muted: #95A5A6;
        --border-color: #E8ECF0;
        --border-light: #F1F3F4;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

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

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

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #2C3E50;
        --border-light: #34495E;
        --shadow-light: 0 2px 8px rgba(44, 62, 80, 0.2);
        --shadow-medium: 0 4px 16px rgba(44, 62, 80, 0.3);
        --text-primary: #1A252F;
        --text-secondary: #34495E;
    }
}
