Arabic-Story1 / style.css
Hma47's picture
Upload 14 files
1616c48 verified
Raw
History Blame Contribute Delete
6.44 kB
:root {
--primary-color: #2F5233; /* Deep Green */
--secondary-color: #94C973; /* Light Green */
--accent-color: #B27C66; /* Wood Brown */
--bg-color: #F4F1EA; /* Soft Sand */
--text-color: #333333;
--white: #FFFFFF;
--highlight: #FFF3CD;
--active-highlight: #FFE082;
--glass-bg: rgba(255, 255, 255, 0.85);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Tajawal', sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
line-height: 1.8;
position: relative;
overflow-x: hidden;
}
.background-decor {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle at 20% 30%, rgba(148, 201, 115, 0.1) 0%, transparent 40%),
radial-gradient(circle at 80% 70%, rgba(178, 124, 102, 0.1) 0%, transparent 40%);
z-index: -1;
pointer-events: none;
}
header {
text-align: center;
padding: 3rem 1rem;
background: var(--glass-bg);
backdrop-filter: blur(10px);
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
margin-bottom: 2rem;
border-bottom: 2px solid var(--secondary-color);
}
header h1 {
font-size: 2.5rem;
color: var(--primary-color);
margin-bottom: 0.5rem;
}
header p {
font-size: 1.2rem;
color: var(--accent-color);
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 0 20px 40px;
display: flex;
flex-direction: column;
gap: 2rem;
}
.story-section, .quiz-section {
background: var(--glass-bg);
border-radius: 20px;
padding: 2rem;
box-shadow: 0 10px 30px rgba(0,0,0,0.05);
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.5);
}
.audio-player {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 2rem;
background: var(--white);
padding: 15px 20px;
border-radius: 15px;
box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.play-btn {
background: var(--primary-color);
color: var(--white);
border: none;
padding: 10px 20px;
border-radius: 25px;
cursor: pointer;
font-family: inherit;
font-size: 1.1rem;
font-weight: bold;
display: flex;
align-items: center;
gap: 8px;
transition: transform 0.2s, background 0.2s;
}
.play-btn:hover {
background: #1e3822;
transform: scale(1.05);
}
.reset-btn {
background: var(--bg-color);
color: var(--text-color);
border: 2px solid var(--secondary-color);
padding: 10px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.2s, background 0.2s;
}
.reset-btn:hover {
background: #e8e4db;
transform: rotate(-45deg) scale(1.05);
}
.progress-container {
flex-grow: 1;
height: 10px;
background: #e0e0e0;
border-radius: 5px;
cursor: pointer;
overflow: hidden;
}
.progress-bar {
height: 100%;
background: var(--secondary-color);
width: 0%;
transition: width 0.1s linear;
}
.text-content {
font-size: 1.6rem;
line-height: 2.2;
}
.paragraph-wrapper {
display: flex;
align-items: center;
gap: 20px;
margin-bottom: 1.5rem;
}
.paragraph-image {
width: 200px;
height: 140px;
object-fit: cover;
border-radius: 12px;
flex-shrink: 0;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
.paragraph-wrapper {
flex-direction: column;
}
.paragraph-image {
width: 100%;
height: 200px;
}
}
.sentence {
display: block;
padding: 15px 20px;
border-radius: 12px;
margin-bottom: 0;
flex-grow: 1;
background: rgba(255, 255, 255, 0.4);
transition: background 0.3s, transform 0.3s;
}
.sentence.active {
background: var(--highlight);
border-right: 4px solid var(--active-highlight);
transform: scale(1.02);
}
.word {
display: inline-block;
position: relative;
cursor: pointer;
transition: color 0.2s;
}
.word.has-translation {
color: var(--primary-color);
font-weight: 700;
border-bottom: 1px dashed var(--primary-color);
}
.word.has-translation:hover {
color: var(--accent-color);
border-bottom-color: var(--accent-color);
}
.tooltip {
position: absolute;
background: var(--white);
border: 2px solid var(--secondary-color);
border-radius: 12px;
padding: 10px 15px;
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
z-index: 100;
pointer-events: none;
opacity: 0;
transform: translate(-50%, 10px);
transition: opacity 0.3s, transform 0.3s;
text-align: center;
min-width: 120px;
}
.tooltip.show {
opacity: 1;
transform: translate(-50%, 0);
}
.tooltip-arrow {
position: absolute;
top: 100%;
left: 50%;
margin-left: -8px;
border-width: 8px;
border-style: solid;
border-color: var(--secondary-color) transparent transparent transparent;
transition: left 0.3s ease;
}
.tooltip-content {
display: flex;
flex-direction: column;
}
.tooltip-content .ar-word {
font-weight: bold;
color: var(--primary-color);
font-size: 1.2rem;
margin-bottom: 4px;
}
.tooltip-content .en-translation {
color: #666;
font-size: 1rem;
font-family: sans-serif;
}
.quiz-section h2 {
color: var(--accent-color);
margin-bottom: 1.5rem;
text-align: center;
}
.question-card {
background: var(--white);
padding: 1.5rem;
border-radius: 15px;
margin-bottom: 1.5rem;
box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.question-text {
font-size: 1.2rem;
font-weight: bold;
margin-bottom: 1rem;
color: var(--primary-color);
}
.options-container {
display: flex;
flex-direction: column;
gap: 10px;
}
.option-btn {
background: var(--bg-color);
border: 2px solid transparent;
padding: 10px 15px;
border-radius: 8px;
font-family: inherit;
font-size: 1rem;
cursor: pointer;
text-align: right;
transition: all 0.2s;
}
.option-btn:hover {
background: #e8e4db;
}
.option-btn.correct {
background: #d4edda;
border-color: #c3e6cb;
color: #155724;
}
.option-btn.wrong {
background: #f8d7da;
border-color: #f5c6cb;
color: #721c24;
}
.feedback {
margin-top: 10px;
font-size: 0.9rem;
font-weight: bold;
display: none;
}
.feedback.show {
display: block;
}